The minecraft:modify_item
action type modifies an item stack.
The action is unsuccessful if no item stack is supplied to the action context or if the supplied item stack is empty.
In all other cases it's successful, regardless of the changes made to the item stack.
Name | Description | Type | Default Value |
---|---|---|---|
item_modifier | The item modifier to apply. Note that it uses the minecraft:action loot context type. | An item modifier | |
context | The context to use for applying the item modifier. | An action context parameter set |
{ "type": "minecraft:modify_item", "item_modifier": { "function": "minecraft:set_count", "count": 1 }, "context": { "entity": "this", "position": "this" } }