Record Class ModelPart.Polygon

java.lang.Object
java.lang.Record
net.minecraft.client.model.geom.ModelPart.Polygon
Enclosing class:
ModelPart

public static record ModelPart.Polygon(ModelPart.Vertex[] vertices, org.joml.Vector3fc normal) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.joml.Vector3fc
    The field for the normal record component.
    private final ModelPart.Vertex[]
    The field for the vertices record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Polygon(ModelPart.Vertex[] vertices, float u0, float v0, float u1, float v1, float xTexSize, float yTexSize, boolean mirror, Direction facing)
     
    Polygon(ModelPart.Vertex[] vertices, org.joml.Vector3fc normal)
    Creates an instance of a Polygon 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.
    private static Direction
     
    org.joml.Vector3fc
    Returns the value of the normal record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the vertices record component.

    Methods inherited from class Object

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

    • vertices

      private final ModelPart.Vertex[] vertices
      The field for the vertices record component.
    • normal

      private final org.joml.Vector3fc normal
      The field for the normal record component.
  • Constructor Details

    • Polygon

      public Polygon(ModelPart.Vertex[] vertices, float u0, float v0, float u1, float v1, float xTexSize, float yTexSize, boolean mirror, Direction facing)
    • Polygon

      public Polygon(ModelPart.Vertex[] vertices, org.joml.Vector3fc normal)
      Creates an instance of a Polygon record class.
      Parameters:
      vertices - the value for the vertices record component
      normal - the value for the normal record component
  • Method Details

    • mirrorFacing

      private static Direction mirrorFacing(Direction facing)
    • 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.
    • vertices

      public ModelPart.Vertex[] vertices()
      Returns the value of the vertices record component.
      Returns:
      the value of the vertices record component
    • normal

      public org.joml.Vector3fc normal()
      Returns the value of the normal record component.
      Returns:
      the value of the normal record component