diff options
author | mathiascode <mail@mathias.is> | 2020-04-04 16:00:47 +0200 |
---|---|---|
committer | mathiascode <mail@mathias.is> | 2020-04-04 16:00:47 +0200 |
commit | b8165aebd488b6e4cbfbefb9bb899a811668c8ca (patch) | |
tree | 835857a8820062d3b5aa55878ba2a833afdaad07 /src/Chunk.cpp | |
parent | Implement wither skeletons (#4563) (diff) | |
download | cuberite-spawning.tar cuberite-spawning.tar.gz cuberite-spawning.tar.bz2 cuberite-spawning.tar.lz cuberite-spawning.tar.xz cuberite-spawning.tar.zst cuberite-spawning.zip |
Diffstat (limited to 'src/Chunk.cpp')
-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 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); |