ModelElement

@ApiStatus.Internal
interface ModelElement

Represents a raw element within a model file.

This interface is a sealed type that permits specific implementations for different element types found in BlockBench models, such as cubes, locators, null objects, and cameras.

Since

1.15.2

Inheritors

Types

Link copied to clipboard
Represents a camera element (currently used as a placeholder).
Link copied to clipboard
Represents a standard cube element.
Link copied to clipboard
Represents a locator element, used for positioning attachments or particles.
Link copied to clipboard
Represents a mesh element, allowing for complex geometry beyond simple cubes.
Link copied to clipboard
Represents a null object, often used for grouping or IK targets.
Link copied to clipboard
Represents an unsupported element type.

Properties

Link copied to clipboard
val CAMERA: String = "camera"
The type identifier for a camera element.
Link copied to clipboard
val CUBE: String = "cube"
The type identifier for a cube element.
Link copied to clipboard
val LOCATOR: String = "locator"
The type identifier for a locator element.
Link copied to clipboard
val MESH: String = "mesh"
The type identifier for a mesh element.
Link copied to clipboard
val NULL_OBJECT: String = "null_object"
The type identifier for a null object element.
Link copied to clipboard
val PARSER: JsonDeserializer<ModelElement>
A JSON deserializer that automatically dispatches to the correct ModelElement implementation based on the "type" field.

Functions

Link copied to clipboard
open fun isSupported(): Boolean
Checks if this element type is supported by the engine.
Link copied to clipboard
@NotNull
abstract fun toBlueprint(): @NotNull BlueprintElement
Converts this raw element into a processed BlueprintElement.
Link copied to clipboard
@NotNull
abstract fun type(): @NotNull String
Returns the type identifier of this element (e.g., "cube", "locator").
Link copied to clipboard
@NotNull
abstract fun uuid(): @NotNull String
Returns the unique identifier (UUID) of this element.