Record Class Selector.Special.Chest

java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.resource.asset.definition.Selector.Special.Chest
All Implemented Interfaces:
Selector.Special.Type
Enclosing class:
Selector.Special

public static record Selector.Special.Chest(Texture texture, int openness, @Nullable Selector.Special.Chest.ChestType chestType) extends Record implements Selector.Special.Type
  • Constructor Details

    • Chest

      public Chest(Texture texture, int openness)
    • Chest

      public Chest(Texture texture, int openness, @Nullable Selector.Special.Chest.ChestType chestType)
      Creates an instance of a Chest record class.
      Parameters:
      texture - the value for the texture record component
      openness - the value for the openness record component
      chestType - the value for the chestType record component
  • Method Details

    • id

      public String id()
      Specified by:
      id in interface Selector.Special.Type
    • toJson

      public Map<String,Object> toJson()
      Specified by:
      toJson in interface Selector.Special.Type
    • 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.
    • texture

      public Texture texture()
      Returns the value of the texture record component.
      Returns:
      the value of the texture record component
    • openness

      public int openness()
      Returns the value of the openness record component.
      Returns:
      the value of the openness record component
    • chestType

      @Nullable public Selector.Special.Chest.ChestType chestType()
      Returns the value of the chestType record component.
      Returns:
      the value of the chestType record component