1. Wiki
  2. /Commands
  3. //replaceitem

/replaceitem

Put commands in your add-on as functions: GodCraft writes and packs them for you.Get GodCraft

/replaceitem: Puts an item into a specific slot of a block or entity inventory, like a chest slot or armor slot.

Syntax

<angle brackets> are required, [square brackets] optional. /replaceitem has 4 forms:

/replaceitem <block: replaceitemblock> <position: position> <slotType: blockequipmentslot> <slotId: int> <itemName: item> [amount: int] [data: int] [components: json_object]
/replaceitem <entity: replaceitementity> <target: selection> <slotType: entityequipmentslot> <slotId: int> <itemName: item> [amount: int] [data: int] [components: json_object]
/replaceitem <block: replaceitemblock> <position: position> <slotType: blockequipmentslot> <slotId: int> <oldItemHandling: replacemode> <itemName: item> [amount: int] [data: int] [components: json_object]
/replaceitem <entity: replaceitementity> <target: selection> <slotType: entityequipmentslot> <slotId: int> <oldItemHandling: replacemode> <itemName: item> [amount: int] [data: int] [components: json_object]

Commands: Commands

We use cookies to improve your experience and analyse site traffic. Learn more