Package net.minecraft.client.model.geom
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.Vector3f normal)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.joml.Vector3f
The field for thenormal
record component.private final ModelPart.Vertex[]
The field for thevertices
record component. -
Constructor Summary
ConstructorsConstructorDescriptionPolygon
(ModelPart.Vertex[] p_104362_, float p_104363_, float p_104364_, float p_104365_, float p_104366_, float p_104367_, float p_104368_, boolean p_104369_, Direction p_104370_) Polygon
(ModelPart.Vertex[] vertices, org.joml.Vector3f normal) Creates an instance of aPolygon
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.org.joml.Vector3f
normal()
Returns the value of thenormal
record component.final String
toString()
Returns a string representation of this record class.vertices()
Returns the value of thevertices
record component.
-
Field Details
-
vertices
The field for thevertices
record component. -
normal
private final org.joml.Vector3f normalThe field for thenormal
record component.
-
-
Constructor Details
-
Polygon
public Polygon(ModelPart.Vertex[] p_104362_, float p_104363_, float p_104364_, float p_104365_, float p_104366_, float p_104367_, float p_104368_, boolean p_104369_, Direction p_104370_) -
Polygon
Creates an instance of aPolygon
record class.- Parameters:
vertices
- the value for thevertices
record componentnormal
- the value for thenormal
record component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
vertices
Returns the value of thevertices
record component.- Returns:
- the value of the
vertices
record component
-
normal
public org.joml.Vector3f normal()Returns the value of thenormal
record component.- Returns:
- the value of the
normal
record component
-