summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2014-12-01 20:15:09 +0100
committerAlexander Harkness <me@bearbin.net>2014-12-01 20:15:09 +0100
commit53a55e62b3368b07998190e1c3a615f08a867710 (patch)
treecaaecfcf333e0e9f400cdb944ba964d451c2ea36
parentSimplefied SoulsandRims (diff)
parentUsing static cast for MineShaft spawners (diff)
downloadcuberite-53a55e62b3368b07998190e1c3a615f08a867710.tar
cuberite-53a55e62b3368b07998190e1c3a615f08a867710.tar.gz
cuberite-53a55e62b3368b07998190e1c3a615f08a867710.tar.bz2
cuberite-53a55e62b3368b07998190e1c3a615f08a867710.tar.lz
cuberite-53a55e62b3368b07998190e1c3a615f08a867710.tar.xz
cuberite-53a55e62b3368b07998190e1c3a615f08a867710.tar.zst
cuberite-53a55e62b3368b07998190e1c3a615f08a867710.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/MineShafts.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Generating/MineShafts.cpp b/src/Generating/MineShafts.cpp
index 55b3b64dd..65588ce4b 100644
--- a/src/Generating/MineShafts.cpp
+++ b/src/Generating/MineShafts.cpp
@@ -20,6 +20,7 @@ in a depth-first processing. Each of the descendants will branch randomly, if no
#include "MineShafts.h"
#include "../Cuboid.h"
#include "../BlockEntities/ChestEntity.h"
+#include "../BlockEntities/MobSpawnerEntity.h"
@@ -875,7 +876,9 @@ void cMineShaftCorridor::PlaceSpawner(cChunkDesc & a_ChunkDesc)
)
{
a_ChunkDesc.SetBlockTypeMeta(SpawnerRelX, m_BoundingBox.p1.y + 1, SpawnerRelZ, E_BLOCK_MOB_SPAWNER, 0);
- // TODO: The spawner needs its accompanying cMobSpawnerEntity, when implemented
+ cMobSpawnerEntity * MobSpawner = static_cast<cMobSpawnerEntity *>(a_ChunkDesc.GetBlockEntity(SpawnerRelX, m_BoundingBox.p1.y + 1, SpawnerRelZ));
+ ASSERT((MobSpawner != nullptr) && (MobSpawner->GetBlockType() == E_BLOCK_MOB_SPAWNER));
+ MobSpawner->SetEntity(mtCaveSpider);
}
}