Record Class UVQuad

java.lang.Object
java.lang.Record
com.wildfire.api.uvs.UVQuad

public record UVQuad(int x1, int y1, int x2, int y2) extends Record
  • Field Summary

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

    Constructors
    Constructor
    Description
    UVQuad(int x1, int y1, int x2, int y2)
    Creates an instance of a UVQuad record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    addX1(int x1)
     
    addX2(int x2)
     
    addY1(int y1)
     
    addY2(int y2)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    static UVQuad
     
    final int
    Returns a hash code value for this object.
     
    final String
    Returns a string representation of this record class.
    int
    x1()
    Returns the value of the x1 record component.
    int
    x2()
    Returns the value of the x2 record component.
    int
    y1()
    Returns the value of the y1 record component.
    int
    y2()
    Returns the value of the y2 record component.

    Methods inherited from class Object

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

    • UNUSED

      public static final UVQuad UNUSED
    • CODEC

      public static final com.mojang.serialization.Codec<UVQuad> CODEC
    • OR_LEGACY

      public static final com.mojang.serialization.Codec<UVQuad> OR_LEGACY
    • STREAM_CODEC

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

    • UVQuad

      public UVQuad(int x1, int y1, int x2, int y2)
      Creates an instance of a UVQuad record class.
      Parameters:
      x1 - the value for the x1 record component
      y1 - the value for the y1 record component
      x2 - the value for the x2 record component
      y2 - the value for the y2 record component
  • Method Details

    • addX1

      public UVQuad addX1(int x1)
    • addY1

      public UVQuad addY1(int y1)
    • addX2

      public UVQuad addX2(int x2)
    • addY2

      public UVQuad addY2(int y2)
    • toIntList

      public List<Integer> toIntList()
    • fromIntList

      public static UVQuad fromIntList(List<Integer> list)
    • 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 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.
    • x1

      public int x1()
      Returns the value of the x1 record component.
      Returns:
      the value of the x1 record component
    • y1

      public int y1()
      Returns the value of the y1 record component.
      Returns:
      the value of the y1 record component
    • x2

      public int x2()
      Returns the value of the x2 record component.
      Returns:
      the value of the x2 record component
    • y2

      public int y2()
      Returns the value of the y2 record component.
      Returns:
      the value of the y2 record component