1
0
Fork 0

Merge pull request #3057 from tonibm19/master

Mobs no longer spawn at the top of the nether.
This commit is contained in:
Mattes D 2016-03-01 12:45:43 +01:00
commit 48532d86cf
1 changed files with 5 additions and 0 deletions

View File

@ -134,6 +134,11 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R
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;
BLOCKTYPE TargetBlock = a_Chunk->GetBlock(a_RelX, a_RelY, a_RelZ);