summaryrefslogtreecommitdiffstats
path: root/src/BiomeDef.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2015-03-09 22:39:11 +0100
committerHowaner <franzi.moos@googlemail.com>2015-03-09 22:39:11 +0100
commita96c21fc0d4326ffda93cc78c5dfcfc4bd034e24 (patch)
tree38dba8f86163283d90d1d6d9d2fa420cb4e99231 /src/BiomeDef.cpp
parentReadded old comment (diff)
parentFixed client kick/crash if many block changes happend (diff)
downloadcuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar
cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.gz
cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.bz2
cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.lz
cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.xz
cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.zst
cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.zip
Diffstat (limited to 'src/BiomeDef.cpp')
-rw-r--r--src/BiomeDef.cpp127
1 files changed, 127 insertions, 0 deletions
diff --git a/src/BiomeDef.cpp b/src/BiomeDef.cpp
index 188e06173..3e34ebdbe 100644
--- a/src/BiomeDef.cpp
+++ b/src/BiomeDef.cpp
@@ -222,3 +222,130 @@ bool IsBiomeCold(EMCSBiome a_Biome)
+
+int GetSnowStartHeight(EMCSBiome a_Biome)
+{
+ switch (a_Biome)
+ {
+ case biIcePlainsSpikes:
+ case biIcePlains:
+ case biIceMountains:
+ case biFrozenRiver:
+ case biColdBeach:
+ case biColdTaiga:
+ case biColdTaigaHills:
+ case biColdTaigaM:
+ {
+ // Always snow
+ return 0;
+ }
+
+ case biExtremeHills:
+ case biExtremeHillsM:
+ case biExtremeHillsPlus:
+ case biExtremeHillsPlusM:
+ case biStoneBeach:
+ {
+ // Starts snowing at 96
+ return 96;
+ }
+
+ case biTaiga:
+ case biTaigaHills:
+ case biTaigaM:
+ {
+ // Start snowing at 130
+ return 130;
+ }
+
+ case biMegaTaiga:
+ case biMegaSpruceTaiga:
+ case biMegaTaigaHills:
+ case biMegaSpruceTaigaHills:
+ {
+ // Start snowing at 160
+ return 160;
+ }
+
+ case biRiver:
+ case biOcean:
+ case biDeepOcean:
+ {
+ // Starts snowing at 280
+ return 280;
+ }
+
+ case biBirchForest:
+ case biBirchForestHills:
+ case biBirchForestM:
+ case biBirchForestHillsM:
+ {
+ // Starts snowing at 335
+ return 335;
+ }
+
+ case biForest:
+ case biForestHills:
+ case biFlowerForest:
+ case biRoofedForest:
+ case biRoofedForestM:
+ {
+ // Starts snowing at 400
+ return 400;
+ }
+
+ case biPlains:
+ case biSunflowerPlains:
+ case biSwampland:
+ case biSwamplandM:
+ case biBeach:
+ {
+ // Starts snowing at 460
+ return 460;
+ }
+
+ case biMushroomIsland:
+ case biMushroomShore:
+ {
+ // Starts snowing at 520
+ return 520;
+ }
+
+ case biJungle:
+ case biJungleHills:
+ case biJungleM:
+ case biJungleEdge:
+ case biJungleEdgeM:
+ {
+ // Starts snowing at 550
+ return 550;
+ }
+
+ case biDesert:
+ case biDesertHills:
+ case biDesertM:
+ case biSavanna:
+ case biSavannaM:
+ case biSavannaPlateau:
+ case biSavannaPlateauM:
+ case biMesa:
+ case biMesaBryce:
+ case biMesaPlateau:
+ case biMesaPlateauF:
+ case biMesaPlateauFM:
+ case biMesaPlateauM:
+ {
+ // These biomes don't actualy have any downfall.
+ return 1000;
+ }
+
+ default:
+ {
+ return 0;
+ }
+ }
+}
+
+
+
+