diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-07-27 14:03:23 +0200 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-07-27 14:03:23 +0200 |
commit | bfad1be567ac4fd2393398f52c615496422a67f8 (patch) | |
tree | c6635d8e92d818f9fc42f6e4253dfc3def65c00c /src/Generating/CompoGen.cpp | |
parent | Added a ceiling to disguise the bedrock above it. (diff) | |
download | cuberite-bfad1be567ac4fd2393398f52c615496422a67f8.tar cuberite-bfad1be567ac4fd2393398f52c615496422a67f8.tar.gz cuberite-bfad1be567ac4fd2393398f52c615496422a67f8.tar.bz2 cuberite-bfad1be567ac4fd2393398f52c615496422a67f8.tar.lz cuberite-bfad1be567ac4fd2393398f52c615496422a67f8.tar.xz cuberite-bfad1be567ac4fd2393398f52c615496422a67f8.tar.zst cuberite-bfad1be567ac4fd2393398f52c615496422a67f8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/CompoGen.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Generating/CompoGen.cpp b/src/Generating/CompoGen.cpp index 655d629b7..87557afa0 100644 --- a/src/Generating/CompoGen.cpp +++ b/src/Generating/CompoGen.cpp @@ -631,7 +631,14 @@ void cCompoGenNether::ComposeTerrain(cChunkDesc & a_ChunkDesc) int Height = a_ChunkDesc.GetHeight(x, z); a_ChunkDesc.SetBlockType(x, Height, z, E_BLOCK_BEDROCK); - int CeilingDisguiseHeight = Height - 2 - (m_Noise1.IntNoise2DInt(a_ChunkDesc.GetChunkX() * cChunkDef::Width + x, a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z) % 3); + // int CeilingDisguiseHeight = Height - 2 - (m_Noise1.IntNoise2DInt(a_ChunkDesc.GetChunkX() * cChunkDef::Width + x, a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z) % 3); + NOISE_DATATYPE CeilingDisguise = (m_Noise1.CubicNoise2D((float)(a_ChunkDesc.GetChunkX() * cChunkDef::Width + x) / 10, (float)(a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z) / 10)); + if (CeilingDisguise < 0) + { + CeilingDisguise = -CeilingDisguise; + } + + int CeilingDisguiseHeight = Height - 2 - CeilingDisguise * 3; for (int y = Height - 1; y > CeilingDisguiseHeight; y--) { |