Record Class BlueprintImage
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.BlueprintImage
- Record Components:
name- the name of the image file (including extension)image- the binary content of the imagemcmeta- the JSON object for the .mcmeta file, if any
public record BlueprintImage(@NotNull String name, byte[] image, @Nullable com.google.gson.JsonObject mcmeta)
extends Record
Represents an image file to be generated as part of the resource pack.
This record holds the image's name, its binary content, and an optional .mcmeta file for animations.
- Since:
- 1.15.2
-
Constructor Summary
ConstructorsConstructorDescriptionBlueprintImage(@NotNull String name, byte[] image, @Nullable com.google.gson.JsonObject mcmeta) Creates an instance of aBlueprintImagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the estimated size of the image in bytes.final inthashCode()Returns a hash code value for this object.byte[]image()Returns the value of theimagerecord component.@Nullable com.google.gson.JsonObjectmcmeta()Returns the value of themcmetarecord component.@NotNull StringReturns the name of the metadata file associated with the png.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull StringpngName()Returns the name of the image file with a .png extension.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlueprintImage
public BlueprintImage(@NotNull @NotNull String name, byte[] image, @Nullable @Nullable com.google.gson.JsonObject mcmeta) Creates an instance of aBlueprintImagerecord class.
-
-
Method Details
-
estimatedSize
public long estimatedSize()Returns the estimated size of the image in bytes.- Returns:
- the image size
- Since:
- 1.15.2
-
pngName
Returns the name of the image file with a .png extension.- Returns:
- the png file name
- Since:
- 2.0.1
-
mcmetaName
Returns the name of the metadata file associated with the png.- Returns:
- the mcmeta file name
- Since:
- 2.0.1
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
-
image
-
mcmeta
-