Record Class BiomeEffects

java.lang.Object
java.lang.Record
fr.fidorial.world.biome.BiomeEffects
Record Components:
waterColor - tint applied to water and cauldrons
foliageColor - leaf and vine tint, or null to let the client compute it
grassColor - grass tint, or null to let the client compute it
dryFoliageColor - leaf litter tint, or null for the default
grassColorModifier - post-processing applied on top of the grass color

public record BiomeEffects(int waterColor, @Nullable Integer foliageColor, @Nullable Integer grassColor, @Nullable Integer dryFoliageColor, GrassColorModifier grassColorModifier) extends Record
The client-side tinting a biome applies.
Since:
0.1.0
  • Field Details

    • DEFAULT

      public static final BiomeEffects DEFAULT
      Overworld temperate defaults, matching minecraft:plains.
  • Constructor Details

  • Method Details

    • builder

      @Contract(value="-> new", pure=true) public static BiomeEffects.Builder 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 of effects.
      Parameters:
      effects - the effects to copy
      Returns:
      a new builder pre-filled with the values of effects
    • skyColorFor

      @Deprecated(since="0.1.0", forRemoval=true) public static int skyColorFor(float temperature)
      Deprecated, for removal: This API element is subject to removal in a future version.
      moved alongside the attribute it feeds; use EnvironmentAttributes.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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • waterColor

      public int waterColor()
      Returns the value of the waterColor record component.
      Returns:
      the value of the waterColor record component
    • foliageColor

      public @Nullable Integer foliageColor()
      Returns the value of the foliageColor record component.
      Returns:
      the value of the foliageColor record component
    • grassColor

      public @Nullable Integer grassColor()
      Returns the value of the grassColor record component.
      Returns:
      the value of the grassColor record component
    • dryFoliageColor

      public @Nullable Integer dryFoliageColor()
      Returns the value of the dryFoliageColor record component.
      Returns:
      the value of the dryFoliageColor record component
    • grassColorModifier

      public GrassColorModifier grassColorModifier()
      Returns the value of the grassColorModifier record component.
      Returns:
      the value of the grassColorModifier record component