summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-04-25 00:00:27 +0200
committerGitHub <noreply@github.com>2020-04-25 00:00:27 +0200
commit9432b57ba8ca4aa4ec6b90d0caf3b76db7494cf9 (patch)
tree0a15e6f1138c31c9e96de3c356f4875f4528a91a /src
parentFix incorrect relative coords usage in farmland handler (#4690) (diff)
downloadcuberite-9432b57ba8ca4aa4ec6b90d0caf3b76db7494cf9.tar
cuberite-9432b57ba8ca4aa4ec6b90d0caf3b76db7494cf9.tar.gz
cuberite-9432b57ba8ca4aa4ec6b90d0caf3b76db7494cf9.tar.bz2
cuberite-9432b57ba8ca4aa4ec6b90d0caf3b76db7494cf9.tar.lz
cuberite-9432b57ba8ca4aa4ec6b90d0caf3b76db7494cf9.tar.xz
cuberite-9432b57ba8ca4aa4ec6b90d0caf3b76db7494cf9.tar.zst
cuberite-9432b57ba8ca4aa4ec6b90d0caf3b76db7494cf9.zip
Diffstat (limited to '')
-rw-r--r--src/Chunk.cpp7
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);