summaryrefslogtreecommitdiffstats
path: root/src/Generating/EndGen.h
diff options
context:
space:
mode:
authorNiels Breuker <niels.breuker@hotmail.nl>2024-03-21 21:57:46 +0100
committerNiels Breuker <niels.breuker@hotmail.nl>2024-03-21 22:12:14 +0100
commita245fefe21b4624cc44ab52f4a57a6975983e85e (patch)
treef2a65f645eca627760020847659e4413876dca10 /src/Generating/EndGen.h
parentfix minecart bugs. (#5516) (diff)
downloadcuberite-a245fefe21b4624cc44ab52f4a57a6975983e85e.tar
cuberite-a245fefe21b4624cc44ab52f4a57a6975983e85e.tar.gz
cuberite-a245fefe21b4624cc44ab52f4a57a6975983e85e.tar.bz2
cuberite-a245fefe21b4624cc44ab52f4a57a6975983e85e.tar.lz
cuberite-a245fefe21b4624cc44ab52f4a57a6975983e85e.tar.xz
cuberite-a245fefe21b4624cc44ab52f4a57a6975983e85e.tar.zst
cuberite-a245fefe21b4624cc44ab52f4a57a6975983e85e.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/EndGen.h39
1 files changed, 26 insertions, 13 deletions
diff --git a/src/Generating/EndGen.h b/src/Generating/EndGen.h
index bd1debdeb..4763352b2 100644
--- a/src/Generating/EndGen.h
+++ b/src/Generating/EndGen.h
@@ -30,28 +30,41 @@ protected:
/** The Perlin noise used for generating */
cPerlinNoise m_Perlin;
- cPerlinNoise m_VoidOffsetNoise;
- NOISE_DATATYPE m_AirThresholdMainIsland;
- NOISE_DATATYPE m_AirThresholdOtherIslands;
+ // XYZ size of the "island", in blocks:
int m_MainIslandSize;
- int m_BaseHeight;
- int m_TerrainTopMultiplier;
- int m_TerrainBottomMultiplier;
- int m_VoidOffsetNoiseMultiplier;
+ int m_IslandThickness;
+ int m_IslandYOffset;
// XYZ Frequencies of the noise functions:
- NOISE_DATATYPE m_FrequencyX;
- NOISE_DATATYPE m_FrequencyY;
- NOISE_DATATYPE m_FrequencyZ;
+ NOISE_DATATYPE m_MainIslandFrequencyX;
+ NOISE_DATATYPE m_MainIslandFrequencyY;
+ NOISE_DATATYPE m_MainIslandFrequencyZ;
+ NOISE_DATATYPE m_MainIslandMinThreshold;
+
+ // XYZ Frequencies of the noise functions on the smaller islands:
+ NOISE_DATATYPE m_SmallIslandFrequencyX;
+ NOISE_DATATYPE m_SmallIslandFrequencyY;
+ NOISE_DATATYPE m_SmallIslandFrequencyZ;
+ NOISE_DATATYPE m_SmallIslandMinThreshold;
+
+
+ // Noise array for the last chunk (in the noise range)
+ cChunkCoords m_LastChunkCoords;
+ NOISE_DATATYPE m_NoiseArray[17 * 17 * 257]; // x + 17 * z + 17 * 17 * y
+
+
+ /** Unless the LastChunk coords are equal to coords given, prepares the internal state (noise array) */
+ void PrepareState(cChunkCoords a_ChunkCoords);
+
+ /** Generates the m_NoiseArray array for the current chunk */
+ void GenerateNoiseArray(void);
// cTerrainShapeGen overrides:
virtual void GenShape(cChunkCoords a_ChunkCoords, cChunkDesc::Shape & a_Shape) override;
+ virtual void InitializeShapeGen(cIniFile & a_IniFile) override;
// cTerrainCompositionGen overrides:
virtual void ComposeTerrain(cChunkDesc & a_ChunkDesc, const cChunkDesc::Shape & a_Shape) override;
-
- // cTerrainShapeGen overrides:
- virtual void InitializeShapeGen(cIniFile & a_IniFile) override;
} ;