Class ClimateSettingsBuilder
java.lang.Object
net.neoforged.neoforge.common.world.ClimateSettingsBuilder
Builder for
Biome.ClimateSettings
.-
Field Summary
Modifier and TypeFieldDescriptionprivate float
private boolean
private float
private Biome.TemperatureModifier
-
Constructor Summary
ModifierConstructorDescriptionprivate
ClimateSettingsBuilder
(boolean hasPrecipitation, float temperature, Biome.TemperatureModifier temperatureModifier, float downfall) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
static ClimateSettingsBuilder
copyOf
(Biome.ClimateSettings settings) static ClimateSettingsBuilder
create
(boolean hasPrecipitation, float temperature, Biome.TemperatureModifier temperatureModifier, float downfall) float
Returns Synced to clients, affects foliage color..float
Returns Synced to clients, affects foliage color, freezing, and weather effects.Returns temperatureModifier Synced to clients, applies a positional modifier to temperature..boolean
void
setDownfall
(float downfall) void
setHasPrecipitation
(boolean hasPrecipitation) void
setTemperature
(float temperature) void
setTemperatureModifier
(Biome.TemperatureModifier temperatureModifier)
-
Field Details
-
hasPrecipitation
private boolean hasPrecipitation -
temperature
private float temperature -
temperatureModifier
-
downfall
private float downfall
-
-
Constructor Details
-
ClimateSettingsBuilder
private ClimateSettingsBuilder(boolean hasPrecipitation, float temperature, Biome.TemperatureModifier temperatureModifier, float downfall)
-
-
Method Details
-
copyOf
- 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 effectstemperature
- 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
- 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
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
- 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.
-