Skip to main content

📐 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​

FieldTypeRequiredDefaultDescription
typestringNominecraft:modelModel type identifier
pathasset pathYes*—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
generationobjectNo—Auto-generate the model JSON from a parent template
blueprintstringNo—Blockbench .bbmodel file converted into the model JSON
tintslistNo—Tint sources, indexed by tintindex in the model geometry
transformationobjectNo—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
FieldTypeRequiredDescription
parentasset pathYesParent model to inherit from (e.g. minecraft:item/generated)
texturesmapNoTexture variable overrides (layer0, layer1, â€Ļ)
displayobjectNoPer-context display transforms (thirdperson_righthand, gui, ground, fixed, head, firstperson_righthand, â€Ļ)
gui_lightstringNoGUI 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