minecraft:durability
The durability item component specifies how much damage the item takes before breaking, and allows the item to be combined to repair or augment them.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
max_durability required | Integermin 0 | — | Max durability is the amount of damage that this item can take before breaking. This is a required parameter and has a minimum of 0. |
damage_chance | Object | {"max": 100, "min": 100} | Specifies the percentage chance of this item losing durability. Default is set to 100. Defined as an int range with min and max value. |
min | Integer | 0 | |
max | Integer | 0 |
Example from the game files
This is how vanilla diamond_spear uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:durability": {
"max_durability": 1560,
"damage_chance": {
"min": 0,
"max": 100
}
}
}Used by 7
Vanilla items with minecraft:durability in their definition:
copper_speardiamond_speargolden_speariron_spearnetherite_spearstone_spearwooden_spearSet it without writing JSON
The item maker writes this component for you from a form and puts it in a ready-to-import .mcaddon.