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:
- Connected Model JSON.
- Always
tconstruct:tool. - Mapping of texture name to texture value in the tool.
- Texture for the part
<name>on small 16x tools. - Texture for the 32x part
<name>on large tools. Unused iflargeisfalse.
- Texture for the part
- List of textures to render in the tool. If unset, defaults to a single non-material part named
tool. Until 1.18.2, the default part setbrokentobroken.- A single part object. Parts will layer in the order in the parts list.
- Part name. Corresponds to a texture in
textures. - Material index on the tool for the part. If unset, part will not have material variants.
- If set, uses this name from
textureswhen the tool is broken instead ofname. 1.19+ uses Overrides to handle broken tools instead.
- Part name. Corresponds to a texture in
- A single part object. Parts will layer in the order in the parts list.
- If true, tool will render in hand using a 32x texture with the same pixel density as small tools. Causes parts to use the
large_prefix on their name. - 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.
- 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
largeisfalse, 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
largeistrue, 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.- Modifier roots for the small 16x tool variant.
- A modifier prefix.
- Modifier roots for the large 32x tool variant.
- A modifier prefix.
- Modifier roots for the small 16x tool variant.
- List of modifiers to render on the tool before any other modifiers are rendered. Any modifiers not in this list are rendered in priority order. Order determines the order these modifiers render on the tool.
- Modifier name to render before other modifiers when present.
- First modifier object, allowing forcing a modifier to render even if not 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.
- Always
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 to1when the tool is broken, and0otherwise. 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:chargingis2, the tool is both blocking and being charged up; used by some modifier combinations.
The following properties are added to crossbows:
tconstruct:ammo: Set to2when the crossbow is loaded with fireworks. Set to1when 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:chargingon bows.tconstruct:pull: Same behavior astconstruct:chargeon bows.