Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / ModelRef

Class: ModelRef โ€‹

Defined in: core/values/model.ts:133

A handle to a registered Model, for Item.X.model(ref). Renders as item_model on 1.21.4+; older versions need legacyModelData.

Implements โ€‹

Constructors โ€‹

Constructor โ€‹

new ModelRef(id, legacyModelData?, model?): ModelRef

Defined in: core/values/model.ts:134

Parameters โ€‹

id โ€‹

string

legacyModelData? โ€‹

number

Fallback custom_model_data for versions predating the item_model component.

model? โ€‹

string

The model file this ref draws, for parents and ItemModel.model. Unset for item definitions with no single model.

Returns โ€‹

ModelRef

Properties โ€‹

id โ€‹

readonly id: string

Defined in: core/values/model.ts:135


legacyModelData? โ€‹

readonly optional legacyModelData?: number

Defined in: core/values/model.ts:137

Fallback custom_model_data for versions predating the item_model component.


model? โ€‹

readonly optional model?: string

Defined in: core/values/model.ts:139

The model file this ref draws, for parents and ItemModel.model. Unset for item definitions with no single model.

Methods โ€‹

render() โ€‹

render(): string

Defined in: core/values/model.ts:142

Returns โ€‹

string

Implementation of โ€‹

CommandValue.render

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.