Package io.github.toxicity188.javamesh
Record Class MeshTriangleName
java.lang.Object
java.lang.Record
io.github.toxicity188.javamesh.MeshTriangleName
- Record Components:
single- model id for triangles that only need a single visible faceduplex- model id for triangles that must be visible from both sides
Holds the Minecraft model ids used for generated triangle elements.
MeshTriangleName names = MeshTriangleName.of("item/mesh_triangle", "item/mesh_triangle_double");
- Since:
- 0.0.1
-
Constructor Summary
ConstructorsConstructorDescriptionMeshTriangleName(@NotNull String single, @NotNull String duplex) Creates an instance of aMeshTriangleNamerecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Stringduplex()Returns the value of theduplexrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static @NotNull MeshTriangleNameCreates a record holding the model ids for single-sided and double-sided triangles.@NotNull Stringsingle()Returns the value of thesinglerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
of
@NotNull public static @NotNull MeshTriangleName of(@NotNull @NotNull String single, @NotNull @NotNull String duplex) Creates a record holding the model ids for single-sided and double-sided triangles.- Parameters:
single- model id for single-sided trianglesduplex- model id for double-sided triangles- Returns:
- a new triangle-name record
- Since:
- 0.0.1
-
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). -
single
Returns the value of thesinglerecord component.- Returns:
- the value of the
singlerecord component
-
duplex
Returns the value of theduplexrecord component.- Returns:
- the value of the
duplexrecord component
-