Record Class OverlayUV

java.lang.Object
java.lang.Record
dev.latvian.mods.klib.texture.OverlayUV
All Implemented Interfaces:
PackedUV

public record OverlayUV(int packed, int u, int v) extends Record implements PackedUV
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final OverlayUV
     
    static final OverlayUV
     
    static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, OverlayUV>
     
    static final OverlayUV
     
    static final OverlayUV
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    OverlayUV(int packed)
     
    OverlayUV(int u, int v)
     
    OverlayUV(int packed, int u, int v)
    Creates an instance of a OverlayUV record class.
  • Method Summary

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

    Methods inherited from class Object

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

    • NORMAL

      public static final OverlayUV NORMAL
    • HURT

      public static final OverlayUV HURT
    • WHITE

      public static final OverlayUV WHITE
    • WHITE_HURT

      public static final OverlayUV WHITE_HURT
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, OverlayUV> STREAM_CODEC
  • Constructor Details

    • OverlayUV

      public OverlayUV(int packed)
    • OverlayUV

      public OverlayUV(int u, int v)
    • OverlayUV

      public OverlayUV(int packed, int u, int v)
      Creates an instance of a OverlayUV record class.
      Parameters:
      packed - the value for the packed record component
      u - the value for the u record component
      v - the value for the v record component
  • Method Details

    • hashCode

      public 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 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 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.
    • 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
    • packed

      public int packed()
      Returns the value of the packed record component.
      Specified by:
      packed in interface PackedUV
      Returns:
      the value of the packed record component
    • u

      public int u()
      Returns the value of the u record component.
      Specified by:
      u in interface PackedUV
      Returns:
      the value of the u record component
    • v

      public int v()
      Returns the value of the v record component.
      Specified by:
      v in interface PackedUV
      Returns:
      the value of the v record component