Record Class BlueprintTexture

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.BlueprintTexture
Record Components:
name - texture name
image - image
uvWidth - uv width
uvHeight - uv height

public record BlueprintTexture(@NotNull String name, BufferedImage image, int uvWidth, int uvHeight) extends Record
Texture of the model
  • Constructor Details

    • BlueprintTexture

      public BlueprintTexture(@NotNull @NotNull String name, BufferedImage image, int uvWidth, int uvHeight)
      Creates an instance of a BlueprintTexture record class.
      Parameters:
      name - the value for the name record component
      image - the value for the image record component
      uvWidth - the value for the uvWidth record component
      uvHeight - the value for the uvHeight record component
  • Method Details

    • isAnimatedTexture

      public boolean isAnimatedTexture()
      Checks this texture is animated
      Returns:
      whether to animate
    • toMcmeta

      @NotNull public @NotNull com.google.gson.JsonObject toMcmeta()
      Generates mcmeta of this image
      Returns:
      mcmeta
    • packName

      @NotNull public @NotNull String packName(@NotNull @NotNull String parentName)
      Creates pack name
      Parameters:
      parentName - parent name
      Returns:
      texture name in pack
    • resolution

      @NotNull public @NotNull ModelResolution resolution()
      Gets model resolution
      Returns:
      resolution
    • 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
    • image

      public BufferedImage image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component
    • uvWidth

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

      public int uvHeight()
      Returns the value of the uvHeight record component.
      Returns:
      the value of the uvHeight record component