Skip to content

helix / ModelRef

Class: ModelRef

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

A typed handle to a registered Model - the <ns>:name id of its item definition, consumed by Item.X.model(ref). On 1.21.4+ it lowers to the item_model component; on older versions it needs legacyModelData (a custom_model_data number) since item_model didn't exist yet.

Implements

Constructors

Constructor

new ModelRef(id, legacyModelData?): ModelRef

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

Parameters

id

string

legacyModelData?

number

Fallback custom_model_data for versions predating the item_model component.

Returns

ModelRef

Properties

id

readonly id: string

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


legacyModelData?

readonly optional legacyModelData?: number

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

Fallback custom_model_data for versions predating the item_model component.

Methods

render()

render(): string

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

Returns

string

Implementation of

CommandValue.render

Released under the MIT License · Credits