summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-04 21:01:05 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-04 21:01:05 +0200
commit7d3d9e92e89e726fc3e999ac343db06b694d95e7 (patch)
treeafbdffc4638a7c179aca3f78ee5a520fc979bc08 /src/Generating/FinishGen.cpp
parentConfigurable portals (diff)
downloadcuberite-7d3d9e92e89e726fc3e999ac343db06b694d95e7.tar
cuberite-7d3d9e92e89e726fc3e999ac343db06b694d95e7.tar.gz
cuberite-7d3d9e92e89e726fc3e999ac343db06b694d95e7.tar.bz2
cuberite-7d3d9e92e89e726fc3e999ac343db06b694d95e7.tar.lz
cuberite-7d3d9e92e89e726fc3e999ac343db06b694d95e7.tar.xz
cuberite-7d3d9e92e89e726fc3e999ac343db06b694d95e7.tar.zst
cuberite-7d3d9e92e89e726fc3e999ac343db06b694d95e7.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 f2d66af70..c77145bc6 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -125,6 +125,15 @@ 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 (
+ ((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;