Package kr.toxicity.model.api.data.raw
Record Class ModelFace
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelFace
- Record Components:
north- the UV mapping for the north faceeast- the UV mapping for the east facesouth- the UV mapping for the south facewest- the UV mapping for the west faceup- the UV mapping for the up facedown- the UV mapping for the down face
@Internal
public record ModelFace(@NotNull ModelUV north, @NotNull ModelUV east, @NotNull ModelUV south, @NotNull ModelUV west, @NotNull ModelUV up, @NotNull ModelUV down)
extends Record
Represents the UV mappings for all six faces of a cube element.
- Since:
- 1.15.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ModelUVdown()Returns the value of thedownrecord component.@NotNull ModelUVeast()Returns the value of theeastrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks if any face has a texture defined.@NotNull ModelUVnorth()Returns the value of thenorthrecord component.@NotNull ModelUVsouth()Returns the value of thesouthrecord component.@NotNull com.google.gson.JsonObjecttoJson(@NotNull ModelBlueprint parent, int tint) Converts the face UV data to a JSON object for the Minecraft model file.final StringtoString()Returns a string representation of this record class.@NotNull ModelUVup()Returns the value of theuprecord component.@NotNull ModelUVwest()Returns the value of thewestrecord component.
-
Constructor Details
-
Method Details
-
toJson
@NotNull public @NotNull com.google.gson.JsonObject toJson(@NotNull @NotNull ModelBlueprint parent, int tint) Converts the face UV data to a JSON object for the Minecraft model file.Only faces with a defined texture will be included in the output.
- Parameters:
parent- the parent model blueprint, used for texture resolutiontint- the tint index to apply- Returns:
- the generated JSON object
- Since:
- 1.15.2
-
hasTexture
public boolean hasTexture()Checks if any face has a texture defined.- Returns:
- true if at least one face has a texture, false otherwise
- Since:
- 1.15.2
-
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). -
north
Returns the value of thenorthrecord component.- Returns:
- the value of the
northrecord component
-
east
Returns the value of theeastrecord component.- Returns:
- the value of the
eastrecord component
-
south
Returns the value of thesouthrecord component.- Returns:
- the value of the
southrecord component
-
west
Returns the value of thewestrecord component.- Returns:
- the value of the
westrecord component
-
up
Returns the value of theuprecord component.- Returns:
- the value of the
uprecord component
-
down
Returns the value of thedownrecord component.- Returns:
- the value of the
downrecord component
-