summaryrefslogtreecommitdiffstats
path: root/source/cChunkGenerator.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-02 14:19:20 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-02 14:19:20 +0200
commit7abaede2457e494290882d9795873aab2309da65 (patch)
tree80542428c66d74fd6fc7c23d55c35a9666e92012 /source/cChunkGenerator.cpp
parentCore: fixed old API (diff)
downloadcuberite-7abaede2457e494290882d9795873aab2309da65.tar
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.gz
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.bz2
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.lz
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.xz
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.zst
cuberite-7abaede2457e494290882d9795873aab2309da65.zip
Diffstat (limited to '')
-rw-r--r--source/cChunkGenerator.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/cChunkGenerator.cpp b/source/cChunkGenerator.cpp
index 16c6eae58..5aa50c20a 100644
--- a/source/cChunkGenerator.cpp
+++ b/source/cChunkGenerator.cpp
@@ -117,6 +117,7 @@ void cChunkGenerator::InitBiomeGen(cIniFile & a_IniFile)
EMCSBiome b = StringToBiome(Biome);
if (b == -1)
{
+ LOGWARN("[Generator]::ConstantBiome value \"%s\" not recognized, using \"Plains\".", Biome.c_str());
b = biPlains;
}
m_BiomeGen = new cBioGenConstant(b);
@@ -163,12 +164,8 @@ void cChunkGenerator::InitHeightGen(cIniFile & a_IniFile)
int Height = a_IniFile.GetValueI("Generator", "FlatHeight", 5);
m_HeightGen = new cHeiGenFlat(Height);
}
- else // "classic" or <not found>
+ else if (NoCaseCompare(HeightGenName, "classic") == 0)
{
- if (NoCaseCompare(HeightGenName, "classic") != 0)
- {
- LOGWARN("Unknown HeightGen \"%s\", using \"classic\" instead.", HeightGenName.c_str());
- }
// These used to be in terrain.ini, but now they are in world.ini (so that multiple worlds can have different values):
float HeightFreq1 = (float)a_IniFile.GetValueF("Generator", "ClassicHeightFreq1", 0.1);
float HeightFreq2 = (float)a_IniFile.GetValueF("Generator", "ClassicHeightFreq2", 1.0);
@@ -178,6 +175,14 @@ void cChunkGenerator::InitHeightGen(cIniFile & a_IniFile)
float HeightAmp3 = (float)a_IniFile.GetValueF("Generator", "ClassicHeightAmp3", 0.5);
m_HeightGen = new cHeiGenClassic(m_Seed, HeightFreq1, HeightAmp1, HeightFreq2, HeightAmp2, HeightFreq3, HeightAmp3);
}
+ else // "biomal" or <not found>
+ {
+ if (NoCaseCompare(HeightGenName, "biomal") != 0)
+ {
+ LOGWARN("Unknown HeightGen \"%s\", using \"Biomal\" instead.", HeightGenName.c_str());
+ }
+ m_HeightGen = new cHeiGenBiomal(m_Seed, *m_BiomeGen);
+ }
}