Skip to content

Commit

Permalink
Change default altitude modifiers values so that it's enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Forstride committed Jan 7, 2024
1 parent 72d0001 commit 67860c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 67860c6

Please sign in to comment.