Get biome at world coords on mob spawn (#4692)
This commit is contained in:
parent
c0e7708aa7
commit
9432b57ba8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user