Items
This page explains how to define custom items in YAML format.
Example
compressed_coal:
type: coal
amount: 1
name: "&8Compressed Coal"
lore:
- "&7A dense chunk of coal, ready for use."
model-data: 1003
damage: 0
repair-cost: 10
flags:
- hide enchants
unbreakable: false
enchants:
smite: 1
attributes:
- knockback_resistance 0.2 operation=multiply slot=chest name=stability
Options
type
type
Description: The base Minecraft material.
Example:
coal
,diamond_sword
,iron_ingot
.
amount
amount
Description: Stack size of the item.
Default:
1
name
name
Description: Custom display name. Supports Minecraft color codes (
&
).Example:
&8Compressed Coal
lore
lore
Description: List of lore lines shown under the item name. Supports color codes.
Example:
lore: - "&7A dense chunk of coal, ready for use."
model-data
model-data
Description: Custom model data value for use with resource packs.
Example:
1003
damage
damage
Description: The item’s durability damage.
Default:
0
repair-cost
repair-cost
Description: Repair cost in an anvil.
Example:
10
flags
flags
Description: A list of ItemFlags 1.16.5-1.18.2, 1.19.4-1.21.4, 1.21.5+
Example:
flags: - hide enchants
unbreakable
unbreakable
Description: Whether the item is unbreakable.
Default:
false
enchants
enchants
Description: A section of enchantments and their levels. 1.16.5-1.17.1, 1.18-1.18.2, 1.19-1.20.4, 1.20.5+
Example:
enchants: smite: 1
attributes
attributes
Description: List of custom attribute modifiers.
Format:
<attribute> <value> operation=<operation> slot=<slot> name=<uniqueName>
Operations:
ADD → Adds a flat value. PERCENT → Increments the base value. MULTIPLY → Multiplies the base value.
Example:
attributes: - knockback_resistance 0.2 operation=multiply slot=chest name=stability