Merge pull request #3057 from tonibm19/master
Mobs no longer spawn at the top of the nether.
This commit is contained in:
commit
48532d86cf
|
@ -134,6 +134,11 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cChunkDef::IsValidHeight(a_RelY - 1) && (a_Chunk->GetBlock(a_RelX, a_RelY - 1, a_RelZ) == E_BLOCK_BEDROCK))
|
||||||
|
{
|
||||||
|
return false; // Make sure mobs do not spawn on bedrock.
|
||||||
|
}
|
||||||
|
|
||||||
cFastRandom Random;
|
cFastRandom Random;
|
||||||
BLOCKTYPE TargetBlock = a_Chunk->GetBlock(a_RelX, a_RelY, a_RelZ);
|
BLOCKTYPE TargetBlock = a_Chunk->GetBlock(a_RelX, a_RelY, a_RelZ);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user