ModelUV

class ModelUV : Record

Represents the UV mapping data for a model face.

This record holds the UV coordinates, rotation, and texture index for a specific face of a model element.

Since

1.15.2

Parameters

uv

the UV coordinates as a Float4 (u1, v1, u2, v2)

rotation

the rotation of the UV map in degrees (0, 90, 180, 270)

texture

the JSON element representing the texture index, can be null

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
open fun hasTexture(): Boolean
Checks if this UV mapping has a valid texture index.
Link copied to clipboard
open fun textureIndex(): Int
Returns the texture index associated with this UV mapping.
Link copied to clipboard
@Nullable
open fun toJson(@NotNull context: @NotNull BlueprintLoadContext, tint: Int): @Nullable JsonObject
Converts this UV data to a JSON object for the Minecraft model file.
Link copied to clipboard
abstract fun toString(): String