đ Model
Overviewâ
Renders a single model file from assets/<namespace>/models/. type defaults to minecraft:model â you can omit it when this is the only type you need.
items:
demo:sword:
material: diamond_sword
model:
path: minecraft:item/custom/sword
Fieldsâ
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | No | minecraft:model | Model type identifier |
path | asset path | Yes | â | Namespaced path to the model JSON (e.g. demo:item/sword) |
generation | object | No | â | Auto-generate the model JSON from a parent template |
tints | list | No | â | Tint sources, indexed by tintindex in the model geometry |
transformation | object | No | â | Display transform overlay (26.1+) |
Generationâ
When generation is set, CraftEngine auto-generates the model JSON â you don't need to provide a model file. The parent is the only required field.
items:
demo:sword:
material: diamond_sword
model:
path: demo:item/sword
generation:
parent: minecraft:item/handheld
textures:
layer0: demo:item/sword
layer1: demo:item/sword_glow
display:
thirdperson_righthand:
rotation: 0,0,0
translation: 0,1,1
scale: 0.85,0.85,0.85
gui_light: front
| Field | Type | Required | Description |
|---|---|---|---|
parent | asset path | Yes | Parent model to inherit from (e.g. minecraft:item/generated) |
textures | map | No | Texture variable overrides (layer0, layer1, âĻ) |
display | object | No | Per-context display transforms (thirdperson_righthand, gui, ground, fixed, head, firstperson_righthand, âĻ) |
gui_light | string | No | GUI lighting mode: front or side |
Tintsâ
items:
demo:dyeable_armor:
material: leather_chestplate
model:
path: minecraft:item/custom/armor
generation:
parent: minecraft:item/generated
textures:
layer0: minecraft:item/custom/armor
layer1: minecraft:item/custom/armor_overlay
tints:
- type: minecraft:dye
default: 16777215
Each tint source applies a color to the model faces tagged with the corresponding tintindex. List order = tintindex order (first entry â tintindex: 0).
All color values accept these formats:
value: 16711680 # Decimal (0x00FF0000)
value: 255,0,0 # RGB 0â255
value: 1.0,0.0,0.0 # RGB 0.0â1.0
minecraft:constantâ
Returns a fixed RGB color.
tints:
- type: minecraft:constant
value: 16711680 # Red
minecraft:dyeâ
Returns value from minecraft:dyed_color component, or default if not present.
- type: minecraft:dye
default: 16777215
minecraft:fireworkâ
Returns average of colors from minecraft:firework_explosion component, or default if there are none.
- type: minecraft:firework
default: 16777215
minecraft:grassâ
Samples textures/colormap/grass.png by climate.
- type: minecraft:grass
temperature: 0.5 # 0.0â1.0
downfall: 0.5 # 0.0â1.0
minecraft:map_colorâ
Returns value from minecraft:map_color component, or default if not present.
- type: minecraft:map_color
default: 16777215
minecraft:potionâ
Returns color from minecraft:potion_contents component: custom_color if present, otherwise average of effect colors, otherwise default. If component is absent, returns default.
- type: minecraft:potion
default: 16777215
minecraft:teamâ
Returns the team color of the context entity, or default if no entity, no team, or team has no color.
- type: minecraft:team
default: 16777215
minecraft:custom_model_dataâ
Reads from the colors list in minecraft:custom_model_data component.
- type: minecraft:custom_model_data
index: 0 # Position in the colors array
default: 16777215