summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2015-02-28 22:40:13 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2015-02-28 22:40:13 +0100
commit0394acfc0ca25e0b3497a4494d98c0b21062ad47 (patch)
treea25519a00bd11285411e98b6d91da22bef3c3dbb /src/Generating
parentImplemented a vines finisher that creates vines in jungle biomes (diff)
downloadcuberite-0394acfc0ca25e0b3497a4494d98c0b21062ad47.tar
cuberite-0394acfc0ca25e0b3497a4494d98c0b21062ad47.tar.gz
cuberite-0394acfc0ca25e0b3497a4494d98c0b21062ad47.tar.bz2
cuberite-0394acfc0ca25e0b3497a4494d98c0b21062ad47.tar.lz
cuberite-0394acfc0ca25e0b3497a4494d98c0b21062ad47.tar.xz
cuberite-0394acfc0ca25e0b3497a4494d98c0b21062ad47.tar.zst
cuberite-0394acfc0ca25e0b3497a4494d98c0b21062ad47.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/ComposableGenerator.cpp3
-rw-r--r--src/Generating/FinishGen.cpp2
-rw-r--r--src/Generating/FinishGen.h6
3 files changed, 7 insertions, 4 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index 09c1c3949..42a805760 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -618,7 +618,8 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
}
else if (NoCaseCompare(*itr, "Vines") == 0)
{
- m_FinishGens.push_back(cFinishGenPtr(new cFinishGenVines(Seed)));
+ int Level = a_IniFile.GetValueSetI("Generator", "VinesLevel", 40);
+ m_FinishGens.push_back(cFinishGenPtr(new cFinishGenVines(Seed, Level)));
}
else if (NoCaseCompare(*itr, "WaterLakes") == 0)
{
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 5b8965906..8790ac0e8 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -287,7 +287,7 @@ void cFinishGenVines::GenFinish(cChunkDesc & a_ChunkDesc)
}
int Height = a_ChunkDesc.GetHeight(x, z);
- for (int y = Height; y > 40; y--)
+ for (int y = Height; y > m_Level; y--)
{
if (a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR)
{
diff --git a/src/Generating/FinishGen.h b/src/Generating/FinishGen.h
index 023d26f10..950406872 100644
--- a/src/Generating/FinishGen.h
+++ b/src/Generating/FinishGen.h
@@ -122,8 +122,9 @@ class cFinishGenVines :
public cFinishGen
{
public:
- cFinishGenVines(int a_Seed) :
- m_Noise(a_Seed)
+ cFinishGenVines(int a_Seed, int a_Level) :
+ m_Noise(a_Seed),
+ m_Level(a_Level)
{
}
@@ -131,6 +132,7 @@ public:
protected:
cNoise m_Noise;
+ int m_Level;
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
};