Item model

Helpers that build a minecraft:item_model object, one for each of its types. Where a field takes one, write the helper's call; its name is the type it makes. Click a type to see what it accepts.

Composite

Composite
Composite(models, transformation?)
models
list of ItemModel
transformationoptional
Transformation

Condition

Condition
Condition(property, on_true, on_false, transformation?)
property
ConditionalPropertyType
on_true
ItemModel
on_false
ItemModel
transformationoptional
Transformation

Empty

Empty
Empty()

Model

Model
Model(model, tints?, transformation?)
model
ModelRef
tintsoptional
list of ModelTint
transformationoptional
Transformation

RangeDispatch

RangeDispatch
RangeDispatch(property, entries, scale?, fallback?, transformation?)
property
NumericPropertyType
entries
list of { threshold: number, model: ItemModel }

List of ranges. Will select last entry with threshold less or equal to value. Order does not matter, list will be sorted by threshold in ascending order.

scaleoptional
number

Factor to multiply the property value with. Defaults to 1.

fallbackoptional
ItemModel

Item model to render if no entries were less or equal to the value.

transformationoptional
Transformation

Select

Select
Select(property, fallback?, transformation?)
property
SelectPropertyType
fallbackoptional
ItemModel

Item model to render if none of the cases matched the value.

transformationoptional
Transformation

Special

Special
Special(model, base, transformation?)
model
special_item_model

Renders a special hardcoded model.

base
ModelRef

Base model, providing transformations, particle texture and GUI light.

transformationoptional
Transformation