Record Class BiomeSpecialEffects

java.lang.Object
java.lang.Record
net.minecraft.world.level.biome.BiomeSpecialEffects

public record BiomeSpecialEffects(int waterColor, Optional<Integer> foliageColorOverride, Optional<Integer> dryFoliageColorOverride, Optional<Integer> grassColorOverride, BiomeSpecialEffects.GrassColorModifier grassColorModifier) extends Record
  • Field Details

    • waterColor

      private final int waterColor
      The field for the waterColor record component.
    • foliageColorOverride

      private final Optional<Integer> foliageColorOverride
      The field for the foliageColorOverride record component.
    • dryFoliageColorOverride

      private final Optional<Integer> dryFoliageColorOverride
      The field for the dryFoliageColorOverride record component.
    • grassColorOverride

      private final Optional<Integer> grassColorOverride
      The field for the grassColorOverride record component.
    • grassColorModifier

      private final BiomeSpecialEffects.GrassColorModifier grassColorModifier
      The field for the grassColorModifier record component.
    • CODEC

      public static final com.mojang.serialization.Codec<BiomeSpecialEffects> CODEC
  • Constructor Details

    • BiomeSpecialEffects

      public BiomeSpecialEffects(int waterColor, Optional<Integer> foliageColorOverride, Optional<Integer> dryFoliageColorOverride, Optional<Integer> grassColorOverride, BiomeSpecialEffects.GrassColorModifier grassColorModifier)
      Creates an instance of a BiomeSpecialEffects record class.
      Parameters:
      waterColor - the value for the waterColor record component
      foliageColorOverride - the value for the foliageColorOverride record component
      dryFoliageColorOverride - the value for the dryFoliageColorOverride record component
      grassColorOverride - the value for the grassColorOverride record component
      grassColorModifier - the value for the grassColorModifier record component
  • Method Details

    • 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
    • foliageColorOverride

      public Optional<Integer> foliageColorOverride()
      Returns the value of the foliageColorOverride record component.
      Returns:
      the value of the foliageColorOverride record component
    • dryFoliageColorOverride

      public Optional<Integer> dryFoliageColorOverride()
      Returns the value of the dryFoliageColorOverride record component.
      Returns:
      the value of the dryFoliageColorOverride record component
    • grassColorOverride

      public Optional<Integer> grassColorOverride()
      Returns the value of the grassColorOverride record component.
      Returns:
      the value of the grassColorOverride record component
    • grassColorModifier

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