Package net.minecraftforge.common.world
Class ClimateSettingsBuilder
java.lang.Object
net.minecraftforge.common.world.ClimateSettingsBuilder
Builder for
Biome.ClimateSettings
.-
Field Summary
Modifier and TypeFieldDescriptionprivate float
private Biome.Precipitation
private float
private Biome.TemperatureModifier
-
Constructor Summary
ModifierConstructorDescriptionprivate
ClimateSettingsBuilder
(Biome.Precipitation precipitation, float temperature, Biome.TemperatureModifier temperatureModifier, float downfall) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
static ClimateSettingsBuilder
copyOf
(Biome.ClimateSettings settings) static ClimateSettingsBuilder
create
(Biome.Precipitation precipitation, 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..void
setDownfall
(float downfall) void
setPrecipitation
(Biome.Precipitation precipitation) void
setTemperature
(float temperature) void
setTemperatureModifier
(Biome.TemperatureModifier temperatureModifier)
-
Field Details
-
precipitation
-
temperature
private float temperature -
temperatureModifier
-
downfall
private float downfall
-
-
Constructor Details
-
ClimateSettingsBuilder
private ClimateSettingsBuilder(Biome.Precipitation precipitation, 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(Biome.Precipitation precipitation, float temperature, Biome.TemperatureModifier temperatureModifier, float downfall) - Parameters:
precipitation
- 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.
-
getPrecipitation
- Returns:
- Synced to clients, determines weather effects.
-
setPrecipitation
- Parameters:
precipitation
- 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.
-