summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.h
diff options
context:
space:
mode:
authorCocosushi6 <sacha.tournes.savry@gmail.com>2018-05-03 20:25:08 +0200
committerpeterbell10 <peterbell10@live.co.uk>2018-05-03 20:25:08 +0200
commitfbf5cf7aa61a48f916afd81ac7e282eac8d50e6f (patch)
treec6c978961d016f5e5167cda73fd22212a3f8df85 /src/Generating/FinishGen.h
parentPrefer static_cast to reinterpret_cast (#4223) (diff)
downloadcuberite-fbf5cf7aa61a48f916afd81ac7e282eac8d50e6f.tar
cuberite-fbf5cf7aa61a48f916afd81ac7e282eac8d50e6f.tar.gz
cuberite-fbf5cf7aa61a48f916afd81ac7e282eac8d50e6f.tar.bz2
cuberite-fbf5cf7aa61a48f916afd81ac7e282eac8d50e6f.tar.lz
cuberite-fbf5cf7aa61a48f916afd81ac7e282eac8d50e6f.tar.xz
cuberite-fbf5cf7aa61a48f916afd81ac7e282eac8d50e6f.tar.zst
cuberite-fbf5cf7aa61a48f916afd81ac7e282eac8d50e6f.zip
Diffstat (limited to 'src/Generating/FinishGen.h')
-rw-r--r--src/Generating/FinishGen.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/Generating/FinishGen.h b/src/Generating/FinishGen.h
index 0138c84bc..b6edce84f 100644
--- a/src/Generating/FinishGen.h
+++ b/src/Generating/FinishGen.h
@@ -260,14 +260,24 @@ class cFinishGenSprinkleFoliage :
public cFinishGen
{
public:
- cFinishGenSprinkleFoliage(int a_Seed) : m_Noise(a_Seed), m_Seed(a_Seed) {}
-
+ cFinishGenSprinkleFoliage(int a_Seed, int a_MaxCactusHeight, int a_MaxSugarcaneHeight):
+ m_Noise(a_Seed),
+ m_Seed(a_Seed),
+ m_MaxCactusHeight(a_MaxCactusHeight),
+ m_MaxSugarcaneHeight(a_MaxSugarcaneHeight)
+ {
+ }
protected:
cNoise m_Noise;
int m_Seed;
+ int m_MaxCactusHeight;
+ int m_MaxSugarcaneHeight;
+
+ /** Tries to place sugarcane at the coords specified, returns true if successful, updates the top variable (hence the & a_RefY) */
+ bool TryAddSugarcane(cChunkDesc & a_ChunkDesc, int a_RelX, HEIGHTTYPE & a_RelY, int a_RelZ);
- /** Tries to place sugarcane at the coords specified, returns true if successful */
- bool TryAddSugarcane(cChunkDesc & a_ChunkDesc, int a_RelX, int a_RelY, int a_RelZ);
+ /** Tries to place cactus at the coords specified, returns true if successful, updates the top variable (hence the & a_RefY) */
+ bool TryAddCactus(cChunkDesc & a_ChunkDesc, int a_RelX, HEIGHTTYPE & a_RelY, int a_RelZ);
// Returns true is the specified biome is a desert or its variant
static bool IsDesertVariant(EMCSBiome a_biome);