summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-12-01 17:29:35 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-12-01 17:29:35 +0100
commit1bf0827a2f88b84df010e24ef52a5d472bd55eb7 (patch)
treed884aa99e76cd6247352f28174b25cea07e7eed4 /src/Generating
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-1bf0827a2f88b84df010e24ef52a5d472bd55eb7.tar
cuberite-1bf0827a2f88b84df010e24ef52a5d472bd55eb7.tar.gz
cuberite-1bf0827a2f88b84df010e24ef52a5d472bd55eb7.tar.bz2
cuberite-1bf0827a2f88b84df010e24ef52a5d472bd55eb7.tar.lz
cuberite-1bf0827a2f88b84df010e24ef52a5d472bd55eb7.tar.xz
cuberite-1bf0827a2f88b84df010e24ef52a5d472bd55eb7.tar.zst
cuberite-1bf0827a2f88b84df010e24ef52a5d472bd55eb7.zip
Diffstat (limited to 'src/Generating')
-rw-r--r--src/Generating/FinishGen.cpp42
1 files changed, 6 insertions, 36 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 898a9b268..b9d702429 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -417,42 +417,12 @@ void cFinishGenSoulsandRims::GenFinish(cChunkDesc & a_ChunkDesc)
continue;
}
- // Check how many blocks there are above the current block. Don't go higher than 2 blocks, because we already bail out if that's the case.
- int NumBlocksAbove = 0;
- for (int I = y + 1; I <= y + 2; I++)
- {
- if (a_ChunkDesc.GetBlockType(x, I, z) != E_BLOCK_AIR)
- {
- NumBlocksAbove++;
- }
- else
- {
- break;
- }
- }
-
- // There are too many blocks above the current block.
- if (NumBlocksAbove == 2)
- {
- continue;
- }
-
- // Check how many blocks there below the current block. Don't go lower than 2 blocks, because we already bail out if that's the case.
- int NumBlocksBelow = 0;
- for (int I = y - 1; I >= y - 2; I--)
- {
- if (a_ChunkDesc.GetBlockType(x, I, z) != E_BLOCK_AIR)
- {
- NumBlocksBelow++;
- }
- else
- {
- break;
- }
- }
-
- // There are too many blocks below the current block
- if (NumBlocksBelow == 2)
+ if (
+ ((a_ChunkDesc.GetBlockType(x, y + 1, z) != E_BLOCK_AIR) &&
+ ( a_ChunkDesc.GetBlockType(x, y + 2, z) != E_BLOCK_AIR)) ||
+ ((a_ChunkDesc.GetBlockType(x, y - 1, z) != E_BLOCK_AIR) &&
+ ( a_ChunkDesc.GetBlockType(x, y - 2, z) != E_BLOCK_AIR))
+ )
{
continue;
}