Record Class Unstitcher.Region

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.Unstitcher.Region
Enclosing class:
Unstitcher

static record Unstitcher.Region(ResourceLocation sprite, double x, double y, double width, double height) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<Unstitcher.Region>
     
    private final double
    The field for the height record component.
    private final ResourceLocation
    The field for the sprite record component.
    private final double
    The field for the width record component.
    private final double
    The field for the x record component.
    private final double
    The field for the y record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Region(ResourceLocation sprite, double x, double y, double width, double height)
    Creates an instance of a Region record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the height record component.
    Returns the value of the sprite record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the width record component.
    double
    x()
    Returns the value of the x record component.
    double
    y()
    Returns the value of the y record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • sprite

      private final ResourceLocation sprite
      The field for the sprite record component.
    • x

      private final double x
      The field for the x record component.
    • y

      private final double y
      The field for the y record component.
    • width

      private final double width
      The field for the width record component.
    • height

      private final double height
      The field for the height record component.
    • CODEC

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

    • Region

      Region(ResourceLocation sprite, double x, double y, double width, double height)
      Creates an instance of a Region record class.
      Parameters:
      sprite - the value for the sprite record component
      x - the value for the x record component
      y - the value for the y record component
      width - the value for the width record component
      height - the value for the height 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 '=='.
      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.
    • sprite

      public ResourceLocation sprite()
      Returns the value of the sprite record component.
      Returns:
      the value of the sprite record component
    • x

      public double x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public double y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • width

      public double width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public double height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component