Record Class Unstitcher

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.Unstitcher
All Implemented Interfaces:
SpriteSource

public record Unstitcher(ResourceLocation resource, List<Unstitcher.Region> regions, double xDivisor, double yDivisor) extends Record implements SpriteSource
  • Field Details

    • resource

      private final ResourceLocation resource
      The field for the resource record component.
    • regions

      private final List<Unstitcher.Region> regions
      The field for the regions record component.
    • xDivisor

      private final double xDivisor
      The field for the xDivisor record component.
    • yDivisor

      private final double yDivisor
      The field for the yDivisor record component.
    • LOGGER

      static final org.slf4j.Logger LOGGER
    • MAP_CODEC

      public static final com.mojang.serialization.MapCodec<Unstitcher> MAP_CODEC
  • Constructor Details

    • Unstitcher

      public Unstitcher(ResourceLocation resource, List<Unstitcher.Region> regions, double xDivisor, double yDivisor)
      Creates an instance of a Unstitcher record class.
      Parameters:
      resource - the value for the resource record component
      regions - the value for the regions record component
      xDivisor - the value for the xDivisor record component
      yDivisor - the value for the yDivisor record component
  • Method Details

    • run

      public void run(ResourceManager p_261498_, SpriteSource.Output p_261828_)
      Specified by:
      run in interface SpriteSource
    • codec

      public com.mojang.serialization.MapCodec<Unstitcher> codec()
      Specified by:
      codec in interface SpriteSource
    • 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.
    • resource

      public ResourceLocation resource()
      Returns the value of the resource record component.
      Returns:
      the value of the resource record component
    • regions

      public List<Unstitcher.Region> regions()
      Returns the value of the regions record component.
      Returns:
      the value of the regions record component
    • xDivisor

      public double xDivisor()
      Returns the value of the xDivisor record component.
      Returns:
      the value of the xDivisor record component
    • yDivisor

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