ModelData

@ApiStatus.Internal
class ModelData : Record

Represents the raw data structure of a model file, typically parsed from a .bbmodel JSON file.

This record holds all the top-level components of a BlockBench model, including metadata, elements, textures, and animations. It serves as the initial data container before being processed into a ModelBlueprint.

Since

1.15.2

Parameters

meta

the metadata of the model

resolution

the texture resolution

elements

the list of cube/mesh elements

outliner

the hierarchical structure of the model

textures

the list of textures used in the model

animations

the list of animations

groups

the list of groups (used in BlockBench 5.0.0+)

placeholder

the animation variable placeholders

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val GSON: Gson
The GSON parser configured for deserializing model data.

Functions

Link copied to clipboard
@NotNull
open fun animations(): @NotNull List<ModelAnimation>
Returns the list of animations, or an empty list if none are defined.
Link copied to clipboard
open fun assertSupported()
Asserts that the model does not contain any unsupported element types.
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
@NotNull
open fun groups(): @NotNull List<ModelGroup>
Returns the list of groups, or an empty list if none are defined.
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
@NotNull
open fun loadBlueprint(@NotNull name: @NotNull String): @NotNull ModelLoadResult
Converts this raw model data into a processed ModelBlueprint.
@NotNull
open fun loadBlueprint(@NotNull name: @NotNull String, strict: Boolean): @NotNull ModelLoadResult
Converts this raw model data into a processed ModelBlueprint with a specific loading mode.
Link copied to clipboard
@NotNull
open fun placeholder(): @NotNull ModelPlaceholder
Returns the animation variable placeholders, or an empty placeholder if none are defined.
Link copied to clipboard
abstract fun toString(): String