summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World.cpp')
-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);