Record Class ChestTriple

java.lang.Object
java.lang.Record
net.anawesomguy.wsmlmb.block.chest.ChestTriple

public record ChestTriple(net.minecraft.util.Identifier singleTexture, net.minecraft.util.Identifier leftTexture, net.minecraft.util.Identifier rightTexture) extends Record
Used for storing Identifiers for chest textures.

The textures must be in the chest atlas, or in the entity/chest directory.

See Also:
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<ChestTriple> CODEC
    • DEFAULT_TEXTURES

      public static final ChestTriple DEFAULT_TEXTURES
      A ChestTriple storing the default textures for a chest.
    • DEFAULT_CHRISTMAS_TEXTURES

      public static final ChestTriple DEFAULT_CHRISTMAS_TEXTURES
      A ChestTriple storing the default textures for a chest when it is Christmas.
  • Constructor Details

    • ChestTriple

      public ChestTriple(net.minecraft.util.Identifier singleTexture, net.minecraft.util.Identifier leftTexture, net.minecraft.util.Identifier rightTexture)
      Creates an instance of a ChestTriple record class.
      Parameters:
      singleTexture - the value for the singleTexture record component
      leftTexture - the value for the leftTexture record component
      rightTexture - the value for the rightTexture record component
  • Method Details

    • getDefault

      public static ChestTriple getDefault()
    • getDefaultChristmas

      public static ChestTriple getDefaultChristmas()
    • getDefault

      public static ChestTriple getDefault(boolean christmas)
    • getSingle

      public net.minecraft.util.Identifier getSingle()
    • getLeft

      public net.minecraft.util.Identifier getLeft()
    • getRight

      public net.minecraft.util.Identifier getRight()
    • isDefault

      public boolean isDefault()
    • isDefaultChristmas

      public boolean isDefaultChristmas()
    • isDefault

      public boolean isDefault(boolean christmas)
    • toSpriteIdentifiers

      public ChestTriple.Sprite toSpriteIdentifiers()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • singleTexture

      public net.minecraft.util.Identifier singleTexture()
      Returns the value of the singleTexture record component.
      Returns:
      the value of the singleTexture record component
    • leftTexture

      public net.minecraft.util.Identifier leftTexture()
      Returns the value of the leftTexture record component.
      Returns:
      the value of the leftTexture record component
    • rightTexture

      public net.minecraft.util.Identifier rightTexture()
      Returns the value of the rightTexture record component.
      Returns:
      the value of the rightTexture record component