diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Chunk.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 5d0c5e0e6..f213dbf69 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -596,7 +596,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 @@ -621,8 +624,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); |