summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-07-23 11:02:42 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2014-07-23 11:02:42 +0200
commit9080f14dc2a1010d4169ba690c4bda8da1188ae9 (patch)
tree344de9f53cb824f6fd3ccaab037b79506c7d795e /src
parentBlockLeaves: Fixed comment style. (diff)
downloadcuberite-9080f14dc2a1010d4169ba690c4bda8da1188ae9.tar
cuberite-9080f14dc2a1010d4169ba690c4bda8da1188ae9.tar.gz
cuberite-9080f14dc2a1010d4169ba690c4bda8da1188ae9.tar.bz2
cuberite-9080f14dc2a1010d4169ba690c4bda8da1188ae9.tar.lz
cuberite-9080f14dc2a1010d4169ba690c4bda8da1188ae9.tar.xz
cuberite-9080f14dc2a1010d4169ba690c4bda8da1188ae9.tar.zst
cuberite-9080f14dc2a1010d4169ba690c4bda8da1188ae9.zip
Diffstat (limited to 'src')
-rw-r--r--src/Generating/FinishGen.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 444af5022..c67cc574e 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -125,6 +125,11 @@ void cFinishGenNetherClumpFoliage::TryPlaceClump(cChunkDesc & a_ChunkDesc, int a
float zz = (float) a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z;
for (int y = a_RelY - 2; y < a_RelY + 2; y++)
{
+ if ((y < 1) || (y > cChunkDef::Height))
+ {
+ continue;
+ }
+
if (a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) // Don't replace non air blocks.
{
continue;