Class BiomeBuilder
java.lang.Object
fr.fidorial.world.biome.BiomeBuilder
-
Method Summary
Modifier and TypeMethodDescriptionaddAmbientParticle(AmbientParticle particle) Shorthand forminecraft:visual/ambient_particles.ambientSounds(@Nullable AmbientSounds sounds) Shorthand forminecraft:audio/ambient_sounds.attributes(EnvironmentAttributes attributes) Replaces the whole environment attribute map.attributes(Consumer<EnvironmentAttributes.Builder> configurer) Configures the environment attributes in place, starting from what is already set.Shorthand forminecraft:audio/background_music.build()Returns the immutable definition described by this builder.downfall(float downfall) effects(BiomeEffects effects) effects(Consumer<BiomeEffects.Builder> configurer) Configures the effects in place, starting from the ones currently set.Shorthand forminecraft:visual/fog_color.hasPrecipitation(boolean hasPrecipitation) Shorthand forminecraft:visual/sky_color.temperature(float temperature) Sets the biome temperature.temperatureModifier(TemperatureModifier modifier) Sets the sky color to the value vanilla would derive from the current temperature.waterFogColor(@Nullable Integer color) Shorthand forminecraft:visual/water_fog_color.
-
Method Details
-
key
- Parameters:
key- the namespaced identifier of the biome- Returns:
- this builder
-
hasPrecipitation
- Parameters:
hasPrecipitation- whether rain or snow may fall in the biome- Returns:
- this builder
-
temperature
Sets the biome temperature.Below
0.15water freezes and precipitation falls as snow; above1.0the client stops rendering rain entirely.- Parameters:
temperature- the biome temperature- Returns:
- this builder
-
temperatureModifier
- Parameters:
modifier- how the client reinterprets the temperature- Returns:
- this builder
-
downfall
- Parameters:
downfall- humidity within[0, 1]- Returns:
- this builder
-
effects
- Parameters:
effects- the client-side effects- Returns:
- this builder
-
effects
Configures the effects in place, starting from the ones currently set.- Parameters:
configurer- callback receiving a pre-filled effects builder- Returns:
- this builder
-
attributes
Replaces the whole environment attribute map.- Parameters:
attributes- the attributes this biome sets- Returns:
- this builder
-
attributes
@Contract("_ -> this") public BiomeBuilder attributes(Consumer<EnvironmentAttributes.Builder> configurer) Configures the environment attributes in place, starting from what is already set.- Parameters:
configurer- callback receiving the attribute builder- Returns:
- this builder
-
skyColor
Shorthand forminecraft:visual/sky_color.- Parameters:
color- packed RGB color of the sky- Returns:
- this builder
-
fogColor
Shorthand forminecraft:visual/fog_color.- Parameters:
color- packed RGB color of the distance fog- Returns:
- this builder
-
waterFogColor
Shorthand forminecraft:visual/water_fog_color.- Parameters:
color- packed RGB color of the underwater fog- Returns:
- this builder
-
addAmbientParticle
Shorthand forminecraft:visual/ambient_particles.- Parameters:
particle- the particle to add- Returns:
- this builder
-
ambientSounds
Shorthand forminecraft:audio/ambient_sounds.- Parameters:
sounds- the ambient sounds, ornullto leave unset- Returns:
- this builder
-
backgroundMusic
Shorthand forminecraft:audio/background_music.- Parameters:
music- the background music, ornullto leave unset- Returns:
- this builder
-
vanillaSkyColor
Sets the sky color to the value vanilla would derive from the current temperature.Call this after
temperature(float).- Returns:
- this builder
-
build
Returns the immutable definition described by this builder.- Returns:
- the immutable definition described by this builder
-