diff options
author | Mattes D <github@xoft.cz> | 2014-07-29 17:48:56 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-07-29 17:48:56 +0200 |
commit | 30e64ed4d82c9ef9ac0797a443d07c3f62649b54 (patch) | |
tree | 32ff101a034c0af7d8b4067744b367fcc08e5751 /src/Generating/FinishGen.cpp | |
parent | Merge pull request #1254 from mc-server/SingleTopBlockFinisher (diff) | |
parent | Detrailed whitespace (diff) | |
download | cuberite-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.cpp | 9 |
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; |