summaryrefslogtreecommitdiffstats
path: root/src/Generating/DistortedHeightmap.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-25 22:08:41 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-25 22:08:41 +0100
commit59b80c84fa3eecfa30641b1e42c10a6081cdd241 (patch)
tree4f272e88d64a58b6b2472625fb4728e5169c805b /src/Generating/DistortedHeightmap.cpp
parentMerge pull request #471 from mc-server/Fishing_Catapult (diff)
downloadcuberite-59b80c84fa3eecfa30641b1e42c10a6081cdd241.tar
cuberite-59b80c84fa3eecfa30641b1e42c10a6081cdd241.tar.gz
cuberite-59b80c84fa3eecfa30641b1e42c10a6081cdd241.tar.bz2
cuberite-59b80c84fa3eecfa30641b1e42c10a6081cdd241.tar.lz
cuberite-59b80c84fa3eecfa30641b1e42c10a6081cdd241.tar.xz
cuberite-59b80c84fa3eecfa30641b1e42c10a6081cdd241.tar.zst
cuberite-59b80c84fa3eecfa30641b1e42c10a6081cdd241.zip
Diffstat (limited to 'src/Generating/DistortedHeightmap.cpp')
-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 342a4483f..a2d1c084a 100644
--- a/src/Generating/DistortedHeightmap.cpp
+++ b/src/Generating/DistortedHeightmap.cpp
@@ -101,6 +101,13 @@ static cDistortedHeightmap::sBlockInfo tbMycelium[] =
{E_BLOCK_DIRT, 0},
} ;
+static cDistortedHeightmap::sBlockInfo tbGravel[] =
+{
+ {E_BLOCK_GRAVEL, 0},
+ {E_BLOCK_DIRT, 0},
+ {E_BLOCK_DIRT, 0},
+ {E_BLOCK_DIRT, 0},
+} ;
@@ -146,6 +153,7 @@ static cPattern patDirt (tbDirt, ARRAYCOUNT(tbDirt));
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 patOFSand (tbOFSand, ARRAYCOUNT(tbOFSand));
static cPattern patOFClay (tbOFClay, ARRAYCOUNT(tbOFClay));
@@ -675,7 +683,6 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
case biSavanna:
case biSavannaPlateau:
case biSunflowerPlains:
- case biExtremeHillsM:
case biFlowerForest:
case biTaigaM:
case biSwamplandM:
@@ -686,7 +693,6 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
case biBirchForestHillsM:
case biRoofedForestM:
case biColdTaigaM:
- case biExtremeHillsPlusM:
case biSavannaM:
case biSavannaPlateauM:
{
@@ -737,6 +743,18 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
FillColumnMesa(a_ChunkDesc, a_RelX, a_RelZ);
return;
}
+
+ case biExtremeHillsPlusM:
+ case biExtremeHillsM:
+ {
+ // 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) ? patGravel.Get() : patGrass.Get();
+ FillColumnPattern(a_ChunkDesc, a_RelX, a_RelZ, Pattern);
+ return;
+ }
default:
ASSERT(!"Unhandled biome");
return;