summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.cpp
diff options
context:
space:
mode:
authorp-mcgowan <mickeymcgowan@shaw.ca>2014-12-01 20:44:20 +0100
committerp-mcgowan <mickeymcgowan@shaw.ca>2014-12-01 20:44:20 +0100
commitcb584a87bd8336d590941cec0c204cbf75ab53eb (patch)
tree507e8fe1afe6c584355f7d0921d1555bec3f986c /src/Generating/FinishGen.cpp
parentMerge pull request #1636 from mc-server/MineshaftSpawners (diff)
downloadcuberite-cb584a87bd8336d590941cec0c204cbf75ab53eb.tar
cuberite-cb584a87bd8336d590941cec0c204cbf75ab53eb.tar.gz
cuberite-cb584a87bd8336d590941cec0c204cbf75ab53eb.tar.bz2
cuberite-cb584a87bd8336d590941cec0c204cbf75ab53eb.tar.lz
cuberite-cb584a87bd8336d590941cec0c204cbf75ab53eb.tar.xz
cuberite-cb584a87bd8336d590941cec0c204cbf75ab53eb.tar.zst
cuberite-cb584a87bd8336d590941cec0c204cbf75ab53eb.zip
Diffstat (limited to 'src/Generating/FinishGen.cpp')
-rw-r--r--src/Generating/FinishGen.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index b9d702429..e09646758 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -370,7 +370,8 @@ void cFinishGenSprinkleFoliage::GenFinish(cChunkDesc & a_ChunkDesc)
(a_ChunkDesc.GetBlockType(x + 1, y, z) == E_BLOCK_AIR) &&
(a_ChunkDesc.GetBlockType(x - 1, y, z) == E_BLOCK_AIR) &&
(a_ChunkDesc.GetBlockType(x, y, z + 1) == E_BLOCK_AIR) &&
- (a_ChunkDesc.GetBlockType(x, y, z - 1) == E_BLOCK_AIR)
+ (a_ChunkDesc.GetBlockType(x, y, z - 1) == E_BLOCK_AIR) &&
+ IsDesertVariant(a_ChunkDesc.GetBiome(x, z)
)
{
a_ChunkDesc.SetBlockType(x, ++Top, z, E_BLOCK_CACTUS);
@@ -391,6 +392,17 @@ void cFinishGenSprinkleFoliage::GenFinish(cChunkDesc & a_ChunkDesc)
+bool cFinishGenSprinkleFoliage::IsDesertVariant(EMCSBiome a_biome)
+{
+ return a_biome == biDesertHills ||
+ a_biome == biDesert ||
+ a_biome == biDesertM;
+}
+
+
+
+
+
////////////////////////////////////////////////////////////////////////////////
// cFinishGenSoulsandRims