summaryrefslogtreecommitdiffstats
path: root/src/Generating/CompoGen.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-01-08 15:26:43 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-01-08 15:26:43 +0100
commitca8421fe26f8dcd83fb66cdca0cdef5a5503b54a (patch)
tree80f51783f6985d87bb07a2b80abd362e7325ba6c /src/Generating/CompoGen.cpp
parentFixed AppendVPrintf() handling for large strings. (diff)
downloadcuberite-ca8421fe26f8dcd83fb66cdca0cdef5a5503b54a.tar
cuberite-ca8421fe26f8dcd83fb66cdca0cdef5a5503b54a.tar.gz
cuberite-ca8421fe26f8dcd83fb66cdca0cdef5a5503b54a.tar.bz2
cuberite-ca8421fe26f8dcd83fb66cdca0cdef5a5503b54a.tar.lz
cuberite-ca8421fe26f8dcd83fb66cdca0cdef5a5503b54a.tar.xz
cuberite-ca8421fe26f8dcd83fb66cdca0cdef5a5503b54a.tar.zst
cuberite-ca8421fe26f8dcd83fb66cdca0cdef5a5503b54a.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/CompoGen.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Generating/CompoGen.cpp b/src/Generating/CompoGen.cpp
index f929ddc2f..9c67170d8 100644
--- a/src/Generating/CompoGen.cpp
+++ b/src/Generating/CompoGen.cpp
@@ -589,7 +589,17 @@ void cCompoGenNether::ComposeTerrain(cChunkDesc & a_ChunkDesc)
for (int y = 0; y < SEGMENT_HEIGHT; y++)
{
int Val = Lo + (Hi - Lo) * y / SEGMENT_HEIGHT;
- a_ChunkDesc.SetBlockType(x, y + Segment, z, (Val < m_Threshold) ? E_BLOCK_NETHERRACK : E_BLOCK_AIR);
+ NOISE_DATATYPE NoiseX = ((NOISE_DATATYPE)(BaseX * cChunkDef::Width + x)) / 8;
+ NOISE_DATATYPE NoiseY = ((NOISE_DATATYPE)(BaseZ * cChunkDef::Width + z)) / 8;
+ NOISE_DATATYPE CompBlock = m_Noise1.CubicNoise3D(NoiseX, (float) y, NoiseY);
+ if (CompBlock < -0.5)
+ {
+ a_ChunkDesc.SetBlockType(x, y + Segment, z, (Val < m_Threshold) ? E_BLOCK_SOULSAND : E_BLOCK_AIR);
+ }
+ else
+ {
+ a_ChunkDesc.SetBlockType(x, y + Segment, z, (Val < m_Threshold) ? E_BLOCK_NETHERRACK : E_BLOCK_AIR);
+ }
}
}