summaryrefslogtreecommitdiffstats
path: root/src/Generating/DistortedHeightmap.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-29 16:27:19 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-29 16:27:19 +0200
commit8811837aea2a33ba5da424087429864f811bf5e5 (patch)
treebaeedba8fb618766cf7d4e1657d2d48c84f45a59 /src/Generating/DistortedHeightmap.cpp
parentSuggestions (diff)
parentDistortedHeightmap: Now generates gravel in deep ocean. (diff)
downloadcuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.gz
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.bz2
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.lz
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.xz
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.zst
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.zip
Diffstat (limited to 'src/Generating/DistortedHeightmap.cpp')
-rw-r--r--src/Generating/DistortedHeightmap.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/Generating/DistortedHeightmap.cpp b/src/Generating/DistortedHeightmap.cpp
index b46850a81..c18c402da 100644
--- a/src/Generating/DistortedHeightmap.cpp
+++ b/src/Generating/DistortedHeightmap.cpp
@@ -675,6 +675,8 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
case biForestHills:
case biTaigaHills:
case biExtremeHillsEdge:
+ case biExtremeHillsPlus:
+ case biExtremeHills:
case biJungle:
case biJungleHills:
case biJungleEdge:
@@ -750,18 +752,6 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
return;
}
- case biExtremeHillsPlus:
- case biExtremeHills:
- {
- // Select the pattern to use - stone 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:
{
@@ -769,7 +759,7 @@ void cDistortedHeightmap::ComposeColumn(cChunkDesc & a_ChunkDesc, int a_RelX, in
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.9) ? patStone.Get() : ((Val > 0) ? patGravel.Get() : patGrass.Get());
+ const sBlockInfo * Pattern = (Val < 0.0) ? patStone.Get() : patGrass.Get();
FillColumnPattern(a_ChunkDesc, a_RelX, a_RelZ, Pattern);
return;
}
@@ -819,7 +809,7 @@ void cDistortedHeightmap::FillColumnPattern(cChunkDesc & a_ChunkDesc, int a_RelX
}
// Select the ocean-floor pattern to use:
- a_Pattern = ChooseOceanFloorPattern(a_RelX, a_RelZ);
+ a_Pattern = a_ChunkDesc.GetBiome(a_RelX, a_RelZ) == biDeepOcean ? patGravel.Get() : ChooseOceanFloorPattern(a_RelX, a_RelZ);
HasHadWater = true;
} // for y
a_ChunkDesc.SetBlockType(a_RelX, 0, a_RelZ, E_BLOCK_BEDROCK);