Package kr.toxicity.model.api.data.raw
Record Class ModelUV
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelUV
- Record Components:
uv- uvrotation- rotationtexture- texture
public record ModelUV(@NotNull Float4 uv, float rotation, @Nullable com.google.gson.JsonElement texture)
extends Record
UV data of a model
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks this UV has textures.floatrotation()Returns the value of therotationrecord component.@Nullable com.google.gson.JsonElementtexture()Returns the value of thetexturerecord component.intGets texture index@NotNull com.google.gson.JsonObjecttoJson(@NotNull ModelBlueprint parent, int tint) Gets json data of uvfinal StringtoString()Returns a string representation of this record class.@NotNull Float4uv()Returns the value of theuvrecord component.
-
Constructor Details
-
ModelUV
public ModelUV(@NotNull @NotNull Float4 uv, float rotation, @Nullable @Nullable com.google.gson.JsonElement texture) Creates an instance of aModelUVrecord class.
-
-
Method Details
-
hasTexture
public boolean hasTexture()Checks this UV has textures.- Returns:
- has texture
-
textureIndex
public int textureIndex()Gets texture index- Returns:
- texture index
-
toJson
@NotNull public @NotNull com.google.gson.JsonObject toJson(@NotNull @NotNull ModelBlueprint parent, int tint) Gets json data of uv- Parameters:
parent- parent blueprinttint- tint index- Returns:
- json
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
uv
Returns the value of theuvrecord component.- Returns:
- the value of the
uvrecord component
-
rotation
public float rotation()Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-
texture
@Nullable public @Nullable com.google.gson.JsonElement texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-