Record Class BiomeEffects
java.lang.Object
java.lang.Record
fr.fidorial.world.biome.BiomeEffects
- Record Components:
waterColor- tint applied to water and cauldronsfoliageColor- leaf and vine tint, ornullto let the client compute itgrassColor- grass tint, ornullto let the client compute itdryFoliageColor- leaf litter tint, ornullfor the defaultgrassColorModifier- post-processing applied on top of the grass color
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BiomeEffectsOverworld temperate defaults, matchingminecraft:plains. -
Constructor Summary
ConstructorsConstructorDescriptionBiomeEffects(int waterColor, @Nullable Integer foliageColor, @Nullable Integer grassColor, @Nullable Integer dryFoliageColor, GrassColorModifier grassColorModifier) Creates an instance of aBiomeEffectsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BiomeEffects.Builderbuilder()Returns a new builder pre-filled with vanilla overworld values.static BiomeEffects.Builderbuilder(BiomeEffects effects) Returns a new builder pre-filled with the values ofeffects.Returns the value of thedryFoliageColorrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefoliageColorrecord component.Returns the value of thegrassColorrecord component.Returns the value of thegrassColorModifierrecord component.final inthashCode()Returns a hash code value for this object.static intskyColorFor(float temperature) Deprecated, for removal: This API element is subject to removal in a future version.final StringtoString()Returns a string representation of this record class.intReturns the value of thewaterColorrecord component.
-
Field Details
-
DEFAULT
Overworld temperate defaults, matchingminecraft:plains.
-
-
Constructor Details
-
BiomeEffects
public BiomeEffects(int waterColor, @Nullable Integer foliageColor, @Nullable Integer grassColor, @Nullable Integer dryFoliageColor, GrassColorModifier grassColorModifier) Creates an instance of aBiomeEffectsrecord class.- Parameters:
waterColor- the value for thewaterColorrecord componentfoliageColor- the value for thefoliageColorrecord componentgrassColor- the value for thegrassColorrecord componentdryFoliageColor- the value for thedryFoliageColorrecord componentgrassColorModifier- the value for thegrassColorModifierrecord component
-
-
Method Details
-
builder
Returns a new builder pre-filled with vanilla overworld values.- Returns:
- a new builder pre-filled with vanilla overworld values
-
builder
@Contract(value="_ -> new", pure=true) public static BiomeEffects.Builder builder(BiomeEffects effects) Returns a new builder pre-filled with the values ofeffects.- Parameters:
effects- the effects to copy- Returns:
- a new builder pre-filled with the values of
effects
-
skyColorFor
Deprecated, for removal: This API element is subject to removal in a future version.moved alongside the attribute it feeds; useEnvironmentAttributes.skyColorFor(float)Computes the sky color the vanilla generator derives from a given temperature.- Parameters:
temperature- the biome temperature- Returns:
- the packed RGB sky color
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
waterColor
public int waterColor()Returns the value of thewaterColorrecord component.- Returns:
- the value of the
waterColorrecord component
-
foliageColor
Returns the value of thefoliageColorrecord component.- Returns:
- the value of the
foliageColorrecord component
-
grassColor
Returns the value of thegrassColorrecord component.- Returns:
- the value of the
grassColorrecord component
-
dryFoliageColor
Returns the value of thedryFoliageColorrecord component.- Returns:
- the value of the
dryFoliageColorrecord component
-
grassColorModifier
Returns the value of thegrassColorModifierrecord component.- Returns:
- the value of the
grassColorModifierrecord component
-
EnvironmentAttributes.skyColorFor(float)