Mobs no longer spawn at the top of the nether.
I don't really know if this is the right place for the check, but it works. Add bedrock check fix typo Using code provided by NiLSpace and fixed a horse's bug -Horses can no longer be "controlled" if they're not tamed and saddled removed unrelated horse code Fixed mobs spawning above bedrock
This commit is contained in:
parent
7f76c7f362
commit
91072e1d62
@ -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