summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-10 16:14:19 +0100
committerMattes D <github@xoft.cz>2014-01-10 16:14:19 +0100
commit6943a4df74b8186fcdfd16aea397574bebcde6e6 (patch)
treeca767ea26c53e1cddeee7fd50fcb3bc56e469ac9 /src
parentBiomeVisualiser: Added zooming using the 1 - 8 keys. (diff)
parentFixed recurring pattern. (diff)
downloadcuberite-6943a4df74b8186fcdfd16aea397574bebcde6e6.tar
cuberite-6943a4df74b8186fcdfd16aea397574bebcde6e6.tar.gz
cuberite-6943a4df74b8186fcdfd16aea397574bebcde6e6.tar.bz2
cuberite-6943a4df74b8186fcdfd16aea397574bebcde6e6.tar.lz
cuberite-6943a4df74b8186fcdfd16aea397574bebcde6e6.tar.xz
cuberite-6943a4df74b8186fcdfd16aea397574bebcde6e6.tar.zst
cuberite-6943a4df74b8186fcdfd16aea397574bebcde6e6.zip
Diffstat (limited to 'src')
-rw-r--r--src/Generating/Caves.cpp1
-rw-r--r--src/Generating/CompoGen.cpp17
2 files changed, 17 insertions, 1 deletions
diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp
index c94113f5c..2571e6b77 100644
--- a/src/Generating/Caves.cpp
+++ b/src/Generating/Caves.cpp
@@ -509,6 +509,7 @@ void cCaveTunnel::ProcessChunk(
case E_BLOCK_GRAVEL:
case E_BLOCK_SAND:
case E_BLOCK_SANDSTONE:
+ case E_BLOCK_SOULSAND:
case E_BLOCK_NETHERRACK:
case E_BLOCK_COAL_ORE:
case E_BLOCK_IRON_ORE:
diff --git a/src/Generating/CompoGen.cpp b/src/Generating/CompoGen.cpp
index f929ddc2f..60356fe46 100644
--- a/src/Generating/CompoGen.cpp
+++ b/src/Generating/CompoGen.cpp
@@ -589,7 +589,22 @@ 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);
+ BLOCKTYPE Block = E_BLOCK_AIR;
+ if (Val < m_Threshold) // Don't calculate if the block should be Netherrack or Soulsand when it's already decided that it's air.
+ {
+ NOISE_DATATYPE NoiseX = ((NOISE_DATATYPE)(BaseX + x)) / 8;
+ NOISE_DATATYPE NoiseY = ((NOISE_DATATYPE)(BaseZ + z)) / 8;
+ NOISE_DATATYPE CompBlock = m_Noise1.CubicNoise3D(NoiseX, (float) (y + Segment) / 2, NoiseY);
+ if (CompBlock < -0.5)
+ {
+ Block = E_BLOCK_SOULSAND;
+ }
+ else
+ {
+ Block = E_BLOCK_NETHERRACK;
+ }
+ }
+ a_ChunkDesc.SetBlockType(x, y + Segment, z, Block);
}
}