diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-01-05 03:13:02 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-01-11 17:39:56 +0100 |
commit | 9328afe65c72b29f5cedbf1897ea8559f6b2c42f (patch) | |
tree | 92d9490d062009278ed8d78f8981014e88ba8f05 /src/MobSpawner.cpp | |
parent | zlib -> libdeflate (#5085) (diff) | |
download | cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.gz cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.bz2 cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.lz cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.xz cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.zst cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.zip |
Diffstat (limited to 'src/MobSpawner.cpp')
-rw-r--r-- | src/MobSpawner.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp index b83cd247d..c04467fd3 100644 --- a/src/MobSpawner.cpp +++ b/src/MobSpawner.cpp @@ -74,10 +74,6 @@ eMonsterType cMobSpawner::ChooseMobType(EMCSBiome a_Biome) bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, Vector3i a_RelPos, eMonsterType a_MobType, EMCSBiome a_Biome, bool a_DisableSolidBelowCheck) { - if (a_Chunk == nullptr) - { - return false; - } if ((a_RelPos.y >= cChunkDef::Height - 1) || (a_RelPos.y <= 0)) { return false; @@ -502,9 +498,6 @@ cMonster * cMobSpawner::TryToSpawnHere(cChunk * a_Chunk, Vector3i a_RelPos, EMCS m_NewPack = false; } - // Make sure we are looking at the right chunk to spawn in - a_Chunk = a_Chunk->GetRelNeighborChunkAdjustCoords(a_RelPos); - if ((m_AllowedTypes.find(m_MobType) != m_AllowedTypes.end()) && CanSpawnHere(a_Chunk, a_RelPos, m_MobType, a_Biome)) { auto NewMob = cMonster::NewMonsterFromType(m_MobType); |