From 81696d7b3dfae030d10672d38eb5b28049733cd5 Mon Sep 17 00:00:00 2001 From: makamys Date: Fri, 4 Jun 2021 22:20:54 +0200 Subject: Add option to force vanilla temperature algorithm, fixes SS incompatibility Serene Seasons changes biomes to be colder in certain seasons, making LODMod think there should be snow there, while no snow is actually generated. Setting this config option to true fixes this mismatch. --- src/main/java/makamys/lodmod/util/MCUtil.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/main/java/makamys/lodmod/util/MCUtil.java (limited to 'src/main/java/makamys/lodmod/util') diff --git a/src/main/java/makamys/lodmod/util/MCUtil.java b/src/main/java/makamys/lodmod/util/MCUtil.java new file mode 100644 index 0000000..7f81d74 --- /dev/null +++ b/src/main/java/makamys/lodmod/util/MCUtil.java @@ -0,0 +1,20 @@ +package makamys.lodmod.util; + +import net.minecraft.world.biome.BiomeGenBase; + +public class MCUtil { + + public static float getBiomeTemperatureVanilla(BiomeGenBase biome, int p_150564_1_, int p_150564_2_, int p_150564_3_){ + if (p_150564_2_ > 64) + { + float f = (float)BiomeGenBase.temperatureNoise + .func_151601_a((double)p_150564_1_ * 1.0D / 8.0D, (double)p_150564_3_ * 1.0D / 8.0D) * 4.0F; + return biome.temperature - (f + (float)p_150564_2_ - 64.0F) * 0.05F / 30.0F; + } + else + { + return biome.temperature; + } + } + +} -- cgit