summaryrefslogtreecommitdiffstats
path: root/src/Generating/CompoGenBiomal.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2015-03-08 13:29:49 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2015-03-08 13:29:49 +0100
commit134246fb152740c5f08abb583d399ed7d097faae (patch)
treead306a122272b600c4cee65420349201b04c54c7 /src/Generating/CompoGenBiomal.cpp
parentMerge pull request #1784 from mc-server/SteppyHeiGen (diff)
downloadcuberite-134246fb152740c5f08abb583d399ed7d097faae.tar
cuberite-134246fb152740c5f08abb583d399ed7d097faae.tar.gz
cuberite-134246fb152740c5f08abb583d399ed7d097faae.tar.bz2
cuberite-134246fb152740c5f08abb583d399ed7d097faae.tar.lz
cuberite-134246fb152740c5f08abb583d399ed7d097faae.tar.xz
cuberite-134246fb152740c5f08abb583d399ed7d097faae.tar.zst
cuberite-134246fb152740c5f08abb583d399ed7d097faae.zip
Diffstat (limited to 'src/Generating/CompoGenBiomal.cpp')
-rw-r--r--src/Generating/CompoGenBiomal.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Generating/CompoGenBiomal.cpp b/src/Generating/CompoGenBiomal.cpp
index 030c2baa5..315ccae73 100644
--- a/src/Generating/CompoGenBiomal.cpp
+++ b/src/Generating/CompoGenBiomal.cpp
@@ -542,6 +542,20 @@ protected:
HasHadWater = true;
} // for y
a_ChunkDesc.SetBlockType(a_RelX, 0, a_RelZ, E_BLOCK_BEDROCK);
+
+ EMCSBiome MesaVersion = a_ChunkDesc.GetBiome(a_RelX, a_RelZ);
+ if ((MesaVersion == biMesaPlateauF) || (MesaVersion == biMesaPlateauFM))
+ {
+ if (Top < 95 + static_cast<int>(m_MesaFloor.CubicNoise2D(NoiseY * 2, NoiseX * 2) * 6))
+ {
+ return;
+ }
+
+ BLOCKTYPE Block = m_MesaFloor.CubicNoise2D(NoiseX * 4, NoiseY * 4) < 0 ? E_BLOCK_DIRT : E_BLOCK_GRASS;
+ NIBBLETYPE Meta = Block == E_BLOCK_GRASS ? 0 : 1;
+
+ a_ChunkDesc.SetBlockTypeMeta(a_RelX, Top, a_RelZ, Block, Meta);
+ }
}