Tool Model
This page is about the JSON the rendering for a tool. For the behavior of a tool, see Tool Definitions.
This page describes the format for tool models, which assign the materials to part textures in the tool.
Tool
Tool models are used to list parts for a tool and how they match up to each material on the tool. In addition, they define the location to search for textures for modifier models, which are used to render recipe modifiers on the tool. Finally, this model supports making the tool appear extra large in hand by defining an additional set of 32x textures.
Tool models have the following format:
tconstruct:tool
.
Always <name>
on small 16x tools.
Texture for the part <name>
on large tools. Unused iflarge
isfalse
.
Texture for the 32x part
Mapping of texture name to texture value in the tool.
tool
. Until 1.18.2, the default part setbroken
tobroken
.textures
.
Part name. Corresponds to a texture in - Material index on the tool for the part. If unset, part will not have material variants.
textures
when the tool is broken instead ofname
. 1.19+ uses Overrides to handle broken tools instead.
If set, uses this name from
A single part object. Parts will layer in the order in the parts list.
List of textures to render in the tool. If unset, defaults to a single non-material part named large_
prefix on their name.
If true, tool will render in hand using a 32x texture with the same pixel density as small tools. Causes parts to use the - First value in the list is the X offset, where negative is left and positive is right.
- Second value in the list is the Y offset, where negative is up and positive is down.
If set, the model will be offset by the set number of pixels in large tools. Allows holding the tool notably higher or lower without complex math computing displays.
large
isfalse
, used to specify a list of texture prefixes to search for modifier textures. Will try each prefix in order until a texture is found for the modifier.- A modifier prefix.
If large
istrue
, used to specify a list of texture prefixes for both the large and small tool variants to search for modifier textures. Will try each prefix in order until a texture is found for the modifier.- A modifier prefix.
Modifier roots for the small 16x tool variant.
- A modifier prefix.
Modifier roots for the large 32x tool variant.
If - priority order. Order determines the order these modifiers render on the tool.
- Modifier name to render before other modifiers when present.
- Modifier name to render before other modifiers.
- If true, the modifier will always render even if not present on the tool’s recipe modifiers; useful for tank display. If false (default), the modifier will only render if present in the tool’s modifier list. Useful for forcing a tool trait to render.
First modifier object, allowing forcing a modifier to render even if not present.
List of modifiers to render on the tool before any other modifiers are rendered. Any modifiers not in this list are rendered in
Connected Model JSON.
Overrides
Tool models make use of a bunch of custom item overrides to define behaviors such as brokeness, blocking, and charging up the tool. These overrides are added in the same format as vanilla item models.
The following overrides are added to all tools and armor:
tconstruct:broken
: Since 1.19, this property is set to1
when the tool is broken, and0
otherwise. Used to change tool textures when broken in a far more stable way than the vanilla durability property.
The following overrides are added to all held tools, though not to bows and crossbows on 1.18:
tconstruct:charging
: If1
, the tool is currently being charged, e.g. a bow is being drawn back or a modifier is charging up before use. If2
, the tool is currently blocking like a shield.tconstruct:charge
: Value between 0 and 1 indicating how much the tool is charged. Iftconstruct:charging
is2
, the tool is both blocking and being charged up; used by some modifier combinations.
The following properties are added to crossbows:
tconstruct:ammo
: Set to2
when the crossbow is loaded with fireworks. Set to1
when the crossbow is loaded with an arrow.
In 1.18.2, the following properties are added to bows and crossbows instead of tconstruct:charging
and tconstruct:charge
:
tconstruct:pulling
: Same behavior astconstruct:charging
on bows.tconstruct:pull
: Same behavior astconstruct:charge
on bows.