Interface ModelElement
- All Known Implementing Classes:
ModelElement.Camera, ModelElement.Cube, ModelElement.Locator, ModelElement.Mesh, ModelElement.NullObject, ModelElement.Unsupported
@Internal
public sealed interface ModelElement
permits ModelElement.Locator, ModelElement.Camera, ModelElement.NullObject, ModelElement.Unsupported, ModelElement.Cube, ModelElement.Mesh
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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordRepresents a camera element (currently used as a placeholder).static final recordRepresents a standard cube element.static final recordRepresents a locator element, used for positioning attachments or particles.static final recordRepresents a mesh element, allowing for complex geometry beyond simple cubes.static final recordRepresents a null object, often used for grouping or IK targets.static final recordRepresents an unsupported element type. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe type identifier for a camera element.static final StringThe type identifier for a cube element.static final StringThe type identifier for a locator element.static final StringThe type identifier for a mesh element.static final StringThe type identifier for a null object element.static final com.google.gson.JsonDeserializer<ModelElement> A JSON deserializer that automatically dispatches to the correctModelElementimplementation based on the "type" field. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanChecks if this element type is supported by the engine.@NotNull BlueprintElementConverts this raw element into a processedBlueprintElement.@NotNull Stringtype()Returns the type identifier of this element (e.g., "cube", "locator").@NotNull Stringuuid()Returns the unique identifier (UUID) of this element.
-
Field Details
-
NULL_OBJECT
The type identifier for a null object element.- Since:
- 2.2.1
- See Also:
-
LOCATOR
-
CAMERA
-
CUBE
-
MESH
-
PARSER
A JSON deserializer that automatically dispatches to the correctModelElementimplementation based on the "type" field.- Since:
- 1.15.2
-
-
Method Details
-
uuid
Returns the unique identifier (UUID) of this element.- Returns:
- the UUID string
- Since:
- 1.15.2
-
type
Returns the type identifier of this element (e.g., "cube", "locator").- Returns:
- the type string
- Since:
- 1.15.2
-
toBlueprint
Converts this raw element into a processedBlueprintElement.- Returns:
- the blueprint element
- Since:
- 1.15.2
-
isSupported
default boolean isSupported()Checks if this element type is supported by the engine.- Returns:
- true if supported, false otherwise
- Since:
- 1.15.2
-