User Tools

Site Tools


actions:action_types:modify_item

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
actions:action_types:modify_item [2024/04/30 18:57] – move action up a level errorcraftactions:action_types:modify_item [2024/05/15 13:01] (current) – fix loot context type link errorcraft
Line 1: Line 1:
 ====== minecraft:modify_item ====== ====== minecraft:modify_item ======
 The ''minecraft:modify_item'' action type modifies an item stack. The ''minecraft:modify_item'' action type modifies an item stack.
-The action is unsuccessful if no item stack is supplied to the action contextor if the supplied item stack is empty.+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. In all other cases it's successful, regardless of the changes made to the item stack.
  
Line 7: Line 7:
 ===== Fields ===== ===== Fields =====
 ^  Name  ^  Description  ^  Type  ^  Default Value  ^ ^  Name  ^  Description  ^  Type  ^  Default Value  ^
-| ''item_modifier'' | The [[mc>Item_modifier|item modifier]] to apply. Note that it uses the [[extras:loot_tables:loot_types:action]] [[mc>Loot_table#Loot_context_types|loot context type]]. | An [[mc>Item_modifier|item modifier]] | | +| ''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|action context parameter set]] | |+| ''context'' | The context to use for applying the item modifier. | An [[actions:action_contexts#parameter_sets|action context parameter set]] | |
  
  
Line 15: Line 15:
 { {
   "type": "minecraft:modify_item",   "type": "minecraft:modify_item",
-    "item_modifier": {+  "item_modifier": {
     "function": "minecraft:set_count",     "function": "minecraft:set_count",
     "count": 1     "count": 1
actions/action_types/modify_item.1714503430.txt.gz · Last modified: 2024/04/30 18:57 by errorcraft