The minecraft:damage_item
action damages the item stack in the context by the amount given.
Note that this is different from the minecraft:set_damage item modifier, as this actually breaks the item stack once fully damaged and takes into account preserved items and the Unbreaking enchantment.
It also calls the minecraft:item_durability_changed advancement trigger.
This action is unsuccessful if the item stack is empty or is not damageable.
Name | Description | Type | Default Value |
---|---|---|---|
amount | The amount to damage the item stack by. | A positive integer | |
ignore_game_mode | Whether to always apply damage, regardless if this player is in creative mode or not. | An optional boolean | false |
{ "type": "minecraft:damage_item", "amount": 1 }