diff options
author | tonibm19 <tonibm19@gmail.com> | 2016-02-29 11:09:21 +0100 |
---|---|---|
committer | tonibm19 <tonibm19@gmail.com> | 2016-03-01 12:07:46 +0100 |
commit | 91072e1d62f6a22686ab2b18f50bf6777ade0eec (patch) | |
tree | 3962c4a0cb5241214075d13bf95bcdb9e227796a /src | |
parent | Merge pull request #3052 from cuberite/FixIntGens (diff) | |
download | cuberite-91072e1d62f6a22686ab2b18f50bf6777ade0eec.tar cuberite-91072e1d62f6a22686ab2b18f50bf6777ade0eec.tar.gz cuberite-91072e1d62f6a22686ab2b18f50bf6777ade0eec.tar.bz2 cuberite-91072e1d62f6a22686ab2b18f50bf6777ade0eec.tar.lz cuberite-91072e1d62f6a22686ab2b18f50bf6777ade0eec.tar.xz cuberite-91072e1d62f6a22686ab2b18f50bf6777ade0eec.tar.zst cuberite-91072e1d62f6a22686ab2b18f50bf6777ade0eec.zip |
Diffstat (limited to '')
-rw-r--r-- | src/MobSpawner.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp index 8db6b8edd..60f7cfb43 100644 --- a/src/MobSpawner.cpp +++ b/src/MobSpawner.cpp @@ -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); |