summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-10-29 21:47:20 +0100
committerGitHub <noreply@github.com>2020-10-29 21:47:20 +0100
commit961d5eb420182add0b6cb4d92f260b885563389c (patch)
treec63fb7b3905d2ae59c539cca44845984128c27bb /src/World.cpp
parentRemove BLOCKENTITY_PROTODEF (diff)
downloadcuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.gz
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.bz2
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.lz
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.xz
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.zst
cuberite-961d5eb420182add0b6cb4d92f260b885563389c.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp
index c3996c8ba..3f9150527 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -20,6 +20,7 @@
#include "WorldStorage/ScoreboardSerializer.h"
// Entities (except mobs):
+#include "Entities/EnderCrystal.h"
#include "Entities/ExpOrb.h"
#include "Entities/FallingBlock.h"
#include "Entities/Minecart.h"
@@ -2164,6 +2165,21 @@ UInt32 cWorld::SpawnPrimedTNT(Vector3d a_Pos, int a_FuseTicks, double a_InitialV
+UInt32 cWorld::SpawnEnderCrystal(Vector3d a_Pos, bool a_ShowBottom)
+{
+ auto EnderCrystal = std::make_unique<cEnderCrystal>(a_Pos, a_ShowBottom);
+ auto EnderCrystalPtr = EnderCrystal.get();
+ if (!EnderCrystalPtr->Initialize(std::move(EnderCrystal), *this))
+ {
+ return cEntity::INVALID_ID;
+ }
+ return EnderCrystalPtr->GetUniqueID();
+}
+
+
+
+
+
void cWorld::PlaceBlock(const Vector3i a_Position, const BLOCKTYPE a_BlockType, const NIBBLETYPE a_BlockMeta)
{
SetBlock(a_Position, a_BlockType, a_BlockMeta);