Class ClimateSettingsBuilder

java.lang.Object
net.neoforged.neoforge.common.world.ClimateSettingsBuilder

public class ClimateSettingsBuilder extends Object
  • Field Details

    • hasPrecipitation

      private boolean hasPrecipitation
    • temperature

      private float temperature
    • temperatureModifier

      private Biome.TemperatureModifier temperatureModifier
    • downfall

      private float downfall
  • Constructor Details

    • ClimateSettingsBuilder

      private ClimateSettingsBuilder(boolean hasPrecipitation, float temperature, Biome.TemperatureModifier temperatureModifier, float downfall)
  • Method Details

    • copyOf

      public static ClimateSettingsBuilder copyOf(Biome.ClimateSettings settings)
      Parameters:
      settings - Existing ClimateSettings.
      Returns:
      A new builder with a copy of that ClimateSettings's values.
    • create

      public static ClimateSettingsBuilder create(boolean hasPrecipitation, float temperature, Biome.TemperatureModifier temperatureModifier, float downfall)
      Parameters:
      hasPrecipitation - Synced to clients, determines weather effects
      temperature - Synced to clients, affects foliage color, freezing, and weather effects. Vanilla values are in the range [-0.5, 2.0]
      temperatureModifier - Synced to clients, applies a positional modifier to temperature. Frozen Oceans use this to have occasional warm patches.
      downfall - Synced to clients, affects foliage color. Biomes with downfall > 0.85 count as humid, inhibiting fire spread.
      Returns:
      a new builder with the given values
    • build

      public Biome.ClimateSettings build()
      Returns:
      A new ClimateSettings with the finalized values.
    • hasPrecipitation

      public boolean hasPrecipitation()
      Returns:
      Synced to clients, determines weather effects.
    • setHasPrecipitation

      public void setHasPrecipitation(boolean hasPrecipitation)
      Parameters:
      hasPrecipitation - Synced to clients, determines weather effects.
    • getTemperature

      public float getTemperature()
      Returns Synced to clients, affects foliage color, freezing, and weather effects. Vanilla values are in the range [-0.5, 2.0].
      Returns:
      Synced to clients, affects foliage color, freezing, and weather effects
    • setTemperature

      public void setTemperature(float temperature)
      Parameters:
      temperature - Synced to clients, affects foliage color, freezing, and weather effects. Vanilla values are in the range [-0.5, 2.0].
    • getTemperatureModifier

      public Biome.TemperatureModifier getTemperatureModifier()
      Returns temperatureModifier Synced to clients, applies a positional modifier to temperature.. Frozen Oceans use this to have occasional warm patches.
      Returns:
      temperatureModifier Synced to clients, applies a positional modifier to temperature.
    • setTemperatureModifier

      public void setTemperatureModifier(Biome.TemperatureModifier temperatureModifier)
      Parameters:
      temperatureModifier - Synced to clients, applies a positional modifier to temperature. Frozen Oceans use this to have occasional warm patches.
    • getDownfall

      public float getDownfall()
      Returns Synced to clients, affects foliage color.. Biomes with downfall > 0.85 count as humid, inhibiting fire spread.
      Returns:
      Synced to clients, affects foliage color.
    • setDownfall

      public void setDownfall(float downfall)
      Parameters:
      downfall - Synced to clients, affects foliage color. Biomes with downfall > 0.85 count as humid, inhibiting fire spread.