Package kr.toxicity.model.api.data.raw
Record Class ModelTexture
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelTexture
- Record Components:
name- texture's namesource- texture's base64-encoded byte arraywidth- widthheight- heightuvWidth- uv-widthuvHeight- uv-height
@Internal
public record ModelTexture(@NotNull String name, @NotNull String source, int width, int height, int uvWidth, int uvHeight)
extends Record
A raw model texture.
-
Constructor Summary
ConstructorsConstructorDescriptionModelTexture(@NotNull String name, @NotNull String source, int width, int height, int uvWidth, int uvHeight) Creates an instance of aModelTexturerecord class. -
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.intheight()Returns the value of theheightrecord component.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull Stringsource()Returns the value of thesourcerecord component.@NotNull BlueprintTextureConverts this texture to blueprint texturesfinal StringtoString()Returns a string representation of this record class.intuvHeight()Returns the value of theuvHeightrecord component.intuvWidth()Returns the value of theuvWidthrecord component.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
ModelTexture
public ModelTexture(@NotNull @NotNull String name, @NotNull @NotNull String source, int width, int height, int uvWidth, int uvHeight) Creates an instance of aModelTexturerecord class.- Parameters:
name- the value for thenamerecord componentsource- the value for thesourcerecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentuvWidth- the value for theuvWidthrecord componentuvHeight- the value for theuvHeightrecord component
-
-
Method Details
-
toBlueprint
Converts this texture to blueprint textures- Returns:
- converted textures
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
uvWidth
@SerializedName("uv_width") public int uvWidth()Returns the value of theuvWidthrecord component.- Returns:
- the value of the
uvWidthrecord component
-
uvHeight
@SerializedName("uv_height") public int uvHeight()Returns the value of theuvHeightrecord component.- Returns:
- the value of the
uvHeightrecord component
-