summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-29 17:48:56 +0200
committerMattes D <github@xoft.cz>2014-07-29 17:48:56 +0200
commit30e64ed4d82c9ef9ac0797a443d07c3f62649b54 (patch)
tree32ff101a034c0af7d8b4067744b367fcc08e5751 /src/Generating/FinishGen.cpp
parentMerge pull request #1254 from mc-server/SingleTopBlockFinisher (diff)
parentDetrailed whitespace (diff)
downloadcuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar
cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.gz
cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.bz2
cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.lz
cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.xz
cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.zst
cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/FinishGen.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 842c9ccc5..f53addb68 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -135,6 +135,15 @@ void cFinishGenNetherClumpFoliage::TryPlaceClump(cChunkDesc & a_ChunkDesc, int a
int zz = a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z;
for (int y = MinY; y < MaxY; y++)
{
+ if (
+ ((x < 0) || (x >= cChunkDef::Width)) ||
+ ((y < 0) || (y >= cChunkDef::Height)) ||
+ ((z < 0) || (z >= cChunkDef::Width))
+ )
+ {
+ continue;
+ }
+
if (a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) // Don't replace non air blocks.
{
continue;