Record Class ModelBlueprint
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.ModelBlueprint
- Record Components:
name- the name of the modelresolution- the texture resolution of the modeltextures- the list of textures used by the modelelements- the hierarchical list of model elements (bones)animations- a map of animations available for this model
@Internal
public record ModelBlueprint(@NotNull String name, @NotNull ModelResolution resolution, @NotNull List<BlueprintTexture> textures, @NotNull List<BlueprintElement> elements, @NotNull Map<String,BlueprintAnimation> animations)
extends Record
Represents a fully processed model blueprint, ready for generation and rendering.
This record contains all the necessary data derived from a raw model file, including textures, structural elements (bones/cubes), and animations.
- Since:
- 1.15.2
-
Constructor Summary
ConstructorsConstructorDescriptionModelBlueprint(@NotNull String name, @NotNull ModelResolution resolution, @NotNull List<BlueprintTexture> textures, @NotNull List<BlueprintElement> elements, @NotNull Map<String, BlueprintAnimation> animations) Creates an instance of aModelBlueprintrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Map<String, BlueprintAnimation> Returns the value of theanimationsrecord component.@NotNull Stream<BlueprintImage> buildImage(@NotNull PackObfuscator obfuscator) Generates a stream ofBlueprintImageobjects for resource pack generation.@NotNull List<BlueprintElement> elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks if this blueprint contains any renderable textures.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull ModelResolutionReturns the value of theresolutionrecord component.@NotNull List<BlueprintTexture> textures()Returns the value of thetexturesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelBlueprint
public ModelBlueprint(@NotNull @NotNull String name, @NotNull @NotNull ModelResolution resolution, @NotNull @NotNull List<BlueprintTexture> textures, @NotNull @NotNull List<BlueprintElement> elements, @NotNull @NotNull Map<String, BlueprintAnimation> animations) Creates an instance of aModelBlueprintrecord class.- Parameters:
name- the value for thenamerecord componentresolution- the value for theresolutionrecord componenttextures- the value for thetexturesrecord componentelements- the value for theelementsrecord componentanimations- the value for theanimationsrecord component
-
-
Method Details
-
hasTexture
public boolean hasTexture()Checks if this blueprint contains any renderable textures.- Returns:
- true if at least one texture is renderable, false otherwise
- Since:
- 1.15.2
-
buildImage
@NotNull public @NotNull Stream<BlueprintImage> buildImage(@NotNull @NotNull PackObfuscator obfuscator) Generates a stream ofBlueprintImageobjects for resource pack generation.- Parameters:
obfuscator- the obfuscator to use for texture names- Returns:
- a stream of blueprint images
- Since:
- 1.15.2
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
resolution
Returns the value of theresolutionrecord component.- Returns:
- the value of the
resolutionrecord component
-
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-
elements
Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-
animations
Returns the value of theanimationsrecord component.- Returns:
- the value of the
animationsrecord component
-