actions:action_types:damage_item
Table of Contents
minecraft:damage_item
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.
Fields
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 |
Example
{ "type": "minecraft:damage_item", "amount": 1 }
actions/action_types/damage_item.txt · Last modified: 2024/05/02 17:17 by errorcraft