đ 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). *Optional when blueprint is set â then used as the output path for the generated model |
generation | object | No | â | Auto-generate the model JSON from a parent template |
blueprint | string | No | â | Blockbench .bbmodel file converted into the model JSON |
tints | list | No | â | Tint sources, indexed by tintindex in the model geometry |
transformation | object | No | â | Display transform overlay (26.1+) |
Blueprint (Blockbench) Experimentalâ
Point blueprint at a Blockbench .bbmodel file in the blueprint folder (sibling of configuration and resourcepack; paths are relative to it â the extension is optional), and CraftEngine converts it into a vanilla model JSON at pack generation: geometry, display transforms, GUI lighting and all. No more exporting from Blockbench by hand.
items:
demo:rocket:
material: paper
model:
blueprint: rocket # <pack>/blueprint/rocket.bbmodel
Set path to choose where the generated model JSON (and its exported textures) goes. Leave it out, and the path falls back to item/ plus the bbmodel's path relative to the blueprint folder (e.g. furniture/rocket.bbmodel â demo:item/furniture/rocket):
items:
demo:rocket:
material: paper
model:
path: demo:furniture/rocket_v2 # â assets/demo/models/furniture/rocket_v2.json
blueprint: rocket
Textures: any texture embedded in the bbmodel (i.e. painted in Blockbench) is exported as a PNG alongside the model â demo:furniture/rocket_v2.png, or rocket_v2_1.png, rocket_v2_2.pngâĻ when there are several. Textures linked from existing files keep their original namespace:folder/name reference and are left untouched.
tints and transformation can be combined with blueprint; generation cannot.
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