summaryrefslogtreecommitdiffstats
path: root/source/Generating
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-17 10:16:14 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-17 10:16:14 +0100
commit5e24cb38ac22afa97fb62110f46813d85965d87c (patch)
tree620ae1870ea995f0b034b196073a96e93cd26d21 /source/Generating
parentHuge performance boost in blockhandlers, they have direct access to chunk data when blockchecking. (diff)
downloadcuberite-5e24cb38ac22afa97fb62110f46813d85965d87c.tar
cuberite-5e24cb38ac22afa97fb62110f46813d85965d87c.tar.gz
cuberite-5e24cb38ac22afa97fb62110f46813d85965d87c.tar.bz2
cuberite-5e24cb38ac22afa97fb62110f46813d85965d87c.tar.lz
cuberite-5e24cb38ac22afa97fb62110f46813d85965d87c.tar.xz
cuberite-5e24cb38ac22afa97fb62110f46813d85965d87c.tar.zst
cuberite-5e24cb38ac22afa97fb62110f46813d85965d87c.zip
Diffstat (limited to 'source/Generating')
-rw-r--r--source/Generating/FinishGen.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/Generating/FinishGen.cpp b/source/Generating/FinishGen.cpp
index 8c13b6158..ab3d9488d 100644
--- a/source/Generating/FinishGen.cpp
+++ b/source/Generating/FinishGen.cpp
@@ -19,12 +19,12 @@
-#define DEF_NETHER_WATER_SPRINGS "0, 0; 255, 0"
+#define DEF_NETHER_WATER_SPRINGS "0, 1; 255, 1"
#define DEF_NETHER_LAVA_SPRINGS "0, 0; 30, 0; 31, 50; 120, 50; 127, 0"
#define DEF_OVERWORLD_WATER_SPRINGS "0, 0; 10, 10; 11, 75; 16, 83; 20, 83; 24, 78; 32, 62; 40, 40; 44, 15; 48, 7; 56, 2; 64, 1; 255, 0"
#define DEF_OVERWORLD_LAVA_SPRINGS "0, 0; 10, 5; 11, 45; 48, 2; 64, 1; 255, 0"
-#define DEF_END_WATER_SPRINGS "0, 0; 255, 0"
-#define DEF_END_LAVA_SPRINGS "0, 0; 255, 0"
+#define DEF_END_WATER_SPRINGS "0, 1; 255, 1"
+#define DEF_END_LAVA_SPRINGS "0, 1; 255, 1"
@@ -684,7 +684,14 @@ cFinishGenFluidSprings::cFinishGenFluidSprings(int a_Seed, BLOCKTYPE a_Fluid, cI
}
} // switch (dimension)
AString HeightDistribution = a_IniFile.GetValueSet(SectionName, "HeightDistribution", DefaultHeightDistribution);
- m_HeightDistribution.SetDefString(HeightDistribution);
+ if (!m_HeightDistribution.SetDefString(HeightDistribution) || (m_HeightDistribution.GetSum() <= 0))
+ {
+ LOGWARNING("[%sSprings]: HeightDistribution is invalid, using the default of \"%s\".",
+ (a_Fluid == E_BLOCK_WATER) ? "Water" : "Lava",
+ DefaultHeightDistribution.c_str()
+ );
+ m_HeightDistribution.SetDefString(DefaultHeightDistribution);
+ }
m_Chance = a_IniFile.GetValueSetI(SectionName, "Chance", DefaultChance);
}