Record Class BlueprintTexture
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.BlueprintTexture
- Record Components:
name- texture nameimage- imageuvWidth- uv widthuvHeight- uv height
public record BlueprintTexture(@NotNull String name, BufferedImage image, int uvWidth, int uvHeight)
extends Record
Texture of the model
-
Constructor Summary
ConstructorsConstructorDescriptionBlueprintTexture(@NotNull String name, BufferedImage image, int uvWidth, int uvHeight) Creates an instance of aBlueprintTexturerecord 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.image()Returns the value of theimagerecord component.booleanChecks this texture is animated@NotNull Stringname()Returns the value of thenamerecord component.@NotNull StringCreates pack name@NotNull ModelResolutionGets model resolution@NotNull com.google.gson.JsonObjecttoMcmeta()Generates mcmeta of this imagefinal StringtoString()Returns a string representation of this record class.intuvHeight()Returns the value of theuvHeightrecord component.intuvWidth()Returns the value of theuvWidthrecord component.
-
Constructor Details
-
BlueprintTexture
public BlueprintTexture(@NotNull @NotNull String name, BufferedImage image, int uvWidth, int uvHeight) Creates an instance of aBlueprintTexturerecord class.
-
-
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
Creates pack name- Parameters:
parentName- parent name- Returns:
- texture name in pack
-
resolution
Gets model resolution- Returns:
- resolution
-
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
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
uvWidth
public int uvWidth()Returns the value of theuvWidthrecord component.- Returns:
- the value of the
uvWidthrecord component
-
uvHeight
public int uvHeight()Returns the value of theuvHeightrecord component.- Returns:
- the value of the
uvHeightrecord component
-