From 961d5eb420182add0b6cb4d92f260b885563389c Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Thu, 29 Oct 2020 21:47:20 +0100 Subject: Add beam target, configurable base visibility to Ender Crystals (#5010) * Fixes #4990 Co-authored-by: 12xx12 <12xx12100@gmail.com> --- src/World.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/World.cpp') 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(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); -- cgit v1.2.3