summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authormathiascode <mail@mathias.is>2020-04-04 16:00:47 +0200
committermathiascode <mail@mathias.is>2020-04-04 16:00:47 +0200
commitb8165aebd488b6e4cbfbefb9bb899a811668c8ca (patch)
tree835857a8820062d3b5aa55878ba2a833afdaad07 /src/Chunk.cpp
parentImplement wither skeletons (#4563) (diff)
downloadcuberite-b8165aebd488b6e4cbfbefb9bb899a811668c8ca.tar
cuberite-b8165aebd488b6e4cbfbefb9bb899a811668c8ca.tar.gz
cuberite-b8165aebd488b6e4cbfbefb9bb899a811668c8ca.tar.bz2
cuberite-b8165aebd488b6e4cbfbefb9bb899a811668c8ca.tar.lz
cuberite-b8165aebd488b6e4cbfbefb9bb899a811668c8ca.tar.xz
cuberite-b8165aebd488b6e4cbfbefb9bb899a811668c8ca.tar.zst
cuberite-b8165aebd488b6e4cbfbefb9bb899a811668c8ca.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 17e130cdd..f65cafe91 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -599,7 +599,10 @@ void cChunk::SpawnMobs(cMobSpawner & a_MobSpawner)
ASSERT(TryY > 0);
ASSERT(TryY < cChunkDef::Height - 1);
- EMCSBiome Biome = m_ChunkMap->GetBiomeAt(TryX, TryZ);
+ int WorldX, WorldY, WorldZ;
+ PositionToWorldPosition(TryX, TryY, TryZ, WorldX, WorldY, WorldZ);
+
+ EMCSBiome Biome = m_ChunkMap->GetBiomeAt(WorldX, WorldZ);
// MG TODO :
// Moon cycle (for slime)
// check player and playerspawn presence < 24 blocks
@@ -624,8 +627,6 @@ void cChunk::SpawnMobs(cMobSpawner & a_MobSpawner)
{
continue;
}
- int WorldX, WorldY, WorldZ;
- PositionToWorldPosition(TryX, TryY, TryZ, WorldX, WorldY, WorldZ);
double ActualX = WorldX + 0.5;
double ActualZ = WorldZ + 0.5;
newMob->SetPosition(ActualX, WorldY, ActualZ);