Record Class ModelTexture

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelTexture
Record Components:
name - texture's name
source - texture's base64-encoded byte array
width - width
height - height
uvWidth - uv-width
uvHeight - 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

    Constructors
    Constructor
    Description
    ModelTexture(@NotNull String name, @NotNull String source, int width, int height, int uvWidth, int uvHeight)
    Creates an instance of a ModelTexture record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    @NotNull String
    Returns the value of the name record component.
    @NotNull String
    Returns the value of the source record component.
    Converts this texture to blueprint textures
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the uvHeight record component.
    int
    Returns the value of the uvWidth record component.
    int
    Returns the value of the width record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a ModelTexture record class.
      Parameters:
      name - the value for the name record component
      source - the value for the source record component
      width - the value for the width record component
      height - the value for the height record component
      uvWidth - the value for the uvWidth record component
      uvHeight - the value for the uvHeight record component
  • Method Details

    • toBlueprint

      @NotNull public @NotNull BlueprintTexture toBlueprint()
      Converts this texture to blueprint textures
      Returns:
      converted textures
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      @NotNull public @NotNull String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • source

      @NotNull public @NotNull String source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • uvWidth

      @SerializedName("uv_width") public int uvWidth()
      Returns the value of the uvWidth record component.
      Returns:
      the value of the uvWidth record component
    • uvHeight

      @SerializedName("uv_height") public int uvHeight()
      Returns the value of the uvHeight record component.
      Returns:
      the value of the uvHeight record component