From 67860c6e463b53be8128571788070e14a5fc6359 Mon Sep 17 00:00:00 2001 From: Forstride Date: Sun, 7 Jan 2024 11:41:40 -0500 Subject: [PATCH] Change default altitude modifiers values so that it's enabled by default --- .../config/TemperatureConfig.java | 6 ++---- .../temperature/TemperatureHelperImpl.java | 3 +++ .../gui/container/thermoregulator.png | Bin 1465 -> 1440 bytes 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/toughasnails/config/TemperatureConfig.java b/common/src/main/java/toughasnails/config/TemperatureConfig.java index 2177c7f6..7e5d8148 100644 --- a/common/src/main/java/toughasnails/config/TemperatureConfig.java +++ b/common/src/main/java/toughasnails/config/TemperatureConfig.java @@ -8,11 +8,9 @@ import glitchcore.config.Config; import glitchcore.util.Environment; import toughasnails.api.TANAPI; -import toughasnails.core.ToughAsNails; import toughasnails.temperature.BuiltInTemperatureModifier; import java.util.Arrays; -import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.Predicate; @@ -84,8 +82,8 @@ public void load() temperatureModifierOrder = add("general.temperature_modifier_order", DEFAULT_TEMPERATURE_MODIFIER_ORDER, "The order in which to apply built-in temperature modifiers", TEMPERATURE_MODIFIER_VALIDATOR); // Altitude options - temperatureDropAltitude = addNumber("altitude.temperature_drop_altitude", 1024, -64, 1024, "Y level to drop the temperature at when above"); - temperatureRiseAltitude = addNumber("altitude.temperature_rise_altitude", -64, -64, 1024, "Y level to rise the temperature at when below"); + temperatureDropAltitude = addNumber("altitude.temperature_drop_altitude", 160, -64, 1024, "Y level to drop the temperature at when above"); + temperatureRiseAltitude = addNumber("altitude.temperature_rise_altitude", -32, -64, 1024, "Y level to rise the temperature at when below"); environmentalModifierAltitude = addNumber("altitude.environmental_modifier_altitude", 50, -64, 256, "Y level above which environmental modifiers are applied"); // Blocks options diff --git a/common/src/main/java/toughasnails/temperature/TemperatureHelperImpl.java b/common/src/main/java/toughasnails/temperature/TemperatureHelperImpl.java index 3f01d702..a6811e0f 100644 --- a/common/src/main/java/toughasnails/temperature/TemperatureHelperImpl.java +++ b/common/src/main/java/toughasnails/temperature/TemperatureHelperImpl.java @@ -164,6 +164,9 @@ private static TemperatureLevel getBiomeTemperatureLevel(Level level, BlockPos p private static TemperatureLevel altitudeModifier(Level level, BlockPos pos, TemperatureLevel current) { + if (!level.dimensionType().natural()) + return current; + if (pos.getY() > ModConfig.temperature.temperatureDropAltitude) current = current.decrement(1); else if (pos.getY() < ModConfig.temperature.temperatureRiseAltitude) current = current.increment(1); return current; diff --git a/common/src/main/resources/assets/toughasnails/textures/gui/container/thermoregulator.png b/common/src/main/resources/assets/toughasnails/textures/gui/container/thermoregulator.png index 822401a778e273a16296d08af485e90f52259f43..c9153e05eb85cbb9a348d76f9017c8107da2c999 100644 GIT binary patch literal 1440 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5D>38$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBzHxw0h%1mjcI?>y|Nj~Hee&6Lqv7fM?(Xi;(9jj%|3Ccm|8$_xs~*w+ ztL(qrl>Gnern$K}Q2ol{(pf-Cuq4PY7^o2iFsQDbnFN&NEbxddW?4nt2IgVKSB+cTD#_1@X2#maHkU-|3xA|(e=K@s%_F|&7V{I-1Md9UyT zJM-$+U9WgcDK;x(EWO8F(q15EWy2YSDOGzWx;da~| z&485+-I=?$ZJiXw8gpx1G1HWNd>KpsWnaJ9Z7sYAWK+S*CI9Yct3P*)WCdz|#8PtT z>c6?7tua& zHd;+?H`AZ6qQ?vNcG~7J##hd$7Rl>iV&&Pt?SUdw{66_-Qwz&BGX1%8vF3=gdtMJ? zN$$cOlONoD<@EI5HXX*qeV@LTJX-Pg+~Gft5)RkJ$_n{7j^3aBeUC!?z5Dz}CKl|T z3p7>zK>eRq{S2+lt8<$FS-ZdA*j;>pIVNkL_uZlB>S1 zx%KY{$G+;M%?tgx9W0ekzjs-le)ZdN_jx^^8)CT+SlT|YR{O*3X2LOHQsMDNcOIGG z1DooWGNrkmXMG^3d|c##$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