====== minecraft:modify_item ====== 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. ===== Fields ===== ^ Name ^ Description ^ Type ^ Default Value ^ | ''item_modifier'' | The [[mc>Item_modifier|item modifier]] to apply. Note that it uses the [[extras:loot_tables:loot_context_types:action]] [[mc>Loot_context|loot context type]]. | An [[mc>Item_modifier|item modifier]] | | | ''context'' | The context to use for applying the item modifier. | An [[actions:action_contexts#parameter_sets|action context parameter set]] | | ===== Example ===== { "type": "minecraft:modify_item", "item_modifier": { "function": "minecraft:set_count", "count": 1 }, "context": { "entity": "this", "position": "this" } }