diff options
author | Mattes D <github@xoft.cz> | 2014-12-04 22:04:16 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-12-04 22:04:16 +0100 |
commit | c014f5624c1eda400c08c305978bbcef3f554ff3 (patch) | |
tree | fd15deecb2e9afa17443f9b8a8c51676ad6e0145 /src/Generating/MineShafts.cpp | |
parent | Fixed indent. (diff) | |
parent | Merge pull request #1645 from jonfabe/SpectatorModeFixes (diff) | |
download | cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.gz cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.bz2 cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.lz cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.xz cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.tar.zst cuberite-c014f5624c1eda400c08c305978bbcef3f554ff3.zip |
Diffstat (limited to 'src/Generating/MineShafts.cpp')
-rw-r--r-- | src/Generating/MineShafts.cpp | 5 |
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); } } |