summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-25 22:43:26 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-25 22:43:26 +0100
commitcaf3b6d70cc1735f511925660ca3ea24ff2ae1ac (patch)
treea133134d3d6ee854bdbfe906ab22999098518d26 /src
parentRe-added empty line. (diff)
downloadcuberite-caf3b6d70cc1735f511925660ca3ea24ff2ae1ac.tar
cuberite-caf3b6d70cc1735f511925660ca3ea24ff2ae1ac.tar.gz
cuberite-caf3b6d70cc1735f511925660ca3ea24ff2ae1ac.tar.bz2
cuberite-caf3b6d70cc1735f511925660ca3ea24ff2ae1ac.tar.lz
cuberite-caf3b6d70cc1735f511925660ca3ea24ff2ae1ac.tar.xz
cuberite-caf3b6d70cc1735f511925660ca3ea24ff2ae1ac.tar.zst
cuberite-caf3b6d70cc1735f511925660ca3ea24ff2ae1ac.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/DistortedHeightmap.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/Generating/DistortedHeightmap.cpp b/src/Generating/DistortedHeightmap.cpp
index a2d1c084a..4bb01c36f 100644
--- a/src/Generating/DistortedHeightmap.cpp
+++ b/src/Generating/DistortedHeightmap.cpp
@@ -109,6 +109,13 @@ static cDistortedHeightmap::sBlockInfo tbGravel[] =
{E_BLOCK_DIRT, 0},
} ;
+static cDistortedHeightmap::sBlockInfo tbStone[] =
+{
+ {E_BLOCK_STONE, 0},
+ {E_BLOCK_STONE, 0},
+ {E_BLOCK_STONE, 0},
+ {E_BLOCK_STONE, 0},
+} ;
@@ -154,6 +161,7 @@ static cPattern patPodzol (tbPodzol, ARRAYCOUNT(tbPodzol));
static cPattern patGrassLess(tbGrassLess, ARRAYCOUNT(tbGrassLess));
static cPattern patMycelium (tbMycelium, ARRAYCOUNT(tbMycelium));
static cPattern patGravel (tbGravel, ARRAYCOUNT(tbGravel));
+static cPattern patStone (tbStone, ARRAYCOUNT(tbStone));
static cPattern patOFSand (tbOFSand, ARRAYCOUNT(tbOFSand));
static cPattern patOFClay (tbOFClay, ARRAYCOUNT(tbOFClay));
@@ -656,7 +664,6 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
{
case biOcean:
case biPlains:
- case biExtremeHills:
case biForest:
case biTaiga:
case biSwampland:
@@ -679,7 +686,6 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
case biRoofedForest:
case biColdTaiga:
case biColdTaigaHills:
- case biExtremeHillsPlus:
case biSavanna:
case biSavannaPlateau:
case biSunflowerPlains:
@@ -744,6 +750,18 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
return;
}
+ case biExtremeHillsPlus:
+ case biExtremeHills:
+ {
+ // Select the pattern to use - gravel or grass:
+ NOISE_DATATYPE NoiseX = ((NOISE_DATATYPE)(m_CurChunkX * cChunkDef::Width + a_RelX)) / FrequencyX;
+ NOISE_DATATYPE NoiseY = ((NOISE_DATATYPE)(m_CurChunkZ * cChunkDef::Width + a_RelZ)) / FrequencyZ;
+ NOISE_DATATYPE Val = m_OceanFloorSelect.CubicNoise2D(NoiseX, NoiseY);
+ const sBlockInfo * Pattern = (Val < -0.1) ? patStone.Get() : patGrass.Get();
+ FillColumnPattern(a_ChunkDesc, a_RelX, a_RelZ, Pattern);
+ return;
+ }
+
case biExtremeHillsPlusM:
case biExtremeHillsM:
{