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
-
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 IntStream@NotNull com.google.gson.JsonObjecttoJson(@NotNull BlueprintLoadContext 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
-
ModelFace
-
-
Method Details
-
toJson
@NotNull public @NotNull com.google.gson.JsonObject toJson(@NotNull @NotNull BlueprintLoadContext 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
-
textureIndex
-
toString
-
hashCode
-
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
-
east
-
south
-
west
-
up
-
down
-