1
0

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:
tonibm19 2016-02-29 11:09:21 +01:00
parent 7f76c7f362
commit 91072e1d62

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);