Record Class ModelBlueprint

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.ModelBlueprint
Record Components:
name - the name of the model
resolution - the texture resolution of the model
textures - the list of textures used by the model
elements - 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 Details

  • 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 of BlueprintImage objects for resource pack generation.
      Parameters:
      obfuscator - the obfuscator to use for texture names
      Returns:
      a stream of blueprint images
      Since:
      1.15.2
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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
    • resolution

      @NotNull public @NotNull ModelResolution resolution()
      Returns the value of the resolution record component.
      Returns:
      the value of the resolution record component
    • textures

      @NotNull public @NotNull List<BlueprintTexture> textures()
      Returns the value of the textures record component.
      Returns:
      the value of the textures record component
    • elements

      @NotNull public @NotNull List<BlueprintElement> elements()
      Returns the value of the elements record component.
      Returns:
      the value of the elements record component
    • animations

      @NotNull public @NotNull Map<String,BlueprintAnimation> animations()
      Returns the value of the animations record component.
      Returns:
      the value of the animations record component