Minecraft Armor Slot Id

broken image


  1. Minecraft Armor Slot Id
  2. Minecraft Armor Slot Ids
  3. Minecraft Armor Slots
< Commands
This page contains information about features that have been removed in the latest development versions.
These features are present in the current version, but may be removed when the next update is released.

Armor is a special type of item which players and certain types of mobs can wear for protection, decreasing the damage inflicted upon them. 1 Mechanics 2 List of armor (by slot) 2.1 Helmets/Caps 2.2 Chestplates/tunics 2.3 Leggings/pants 2.4 Boots 3 Armor types 3.1 Leather armor 3.2 Golden armor 3.3 Chainmail armor 3.4 Iron armor 3.5 Diamond armor 3.6 Netherite armor 3.7 Elytra 3.8 Turtle shell. Make your first deposit to Minecraft Armor Slot Id have your money matched 100% up to £100 and 300 spins on Starburst awarded! /replaceitem entity @p armor.chest minecraft:diamondchestplate 1 /replaceitem entity @p armor.head minecraft:stonebutton 1. If you're trying to put an item that is not armor on the player's head, body, legs, or feet, it might not work. MC-83146 /replaceitem does not work for armor slots. Resolved; MC-83384 /replaceitem does not work. Resolved; MC-83668 /replaceitem Is not synced. To my knowledge, there is no way to find the ID of an item on an entity. If you want to find if they have armor on, or how much armor value an entity has, use the 'Armor value of provided entity', located in the 'Entity procedures' tab. Good luck on your searches!

Restrictions
First introduced

Java Edition 1.8 (14w26a)
PE 1.0.5 (PE alpha 1.0.5.0)

Replaces items in the inventories of blocks (chest, furnaces, etc.) or entities (players or mobs) with the given item(s).

Syntax[edit]

  • Java Edition
replaceitem block []
replaceitem entity []
  • Bedrock Edition
replaceitem block slot.container [amount: int] [data: int] [components: json]
replaceitem entity [amount: int] [data: int] [components: json]
replaceitem block slot.container [amount: int] [data: int] [components: json]
replaceitem entity [amount: int] [data: int] [components: json]

Arguments[edit]

Minecraft Armor Slot Id

Minecraft armor slots

JE: : block_pos
BE: position: x y z: CommandPosition

In Java Edition, it must be a block position composed of , and , each of which must be an integer or tilde and caret notation.In Bedrock Edition, it must be a three-dimensional coordinates composed of , and , each of which must be a floating-point number or tilde and caret notation.
Specifies the position of the block to be modified.

JE: : entity
BE: target: target: CommandSelector

Minecraft Armor Slot Ids

Must be a player name, a target selector or a UUID‌[Java Edition only].
Specifies one or more entities to modify.

JE: : item_slot
BE: slotType: EntityEquipmentSlot: EquipmentSlot, slot.container and : int Texas holdem poker apple.

Specifies the inventory slot to be modified. Valid values depend on whether a block or an entity is being modified.
In Bedrock Edition, slotId: int must be a 32-bit integer number. And it must be between -2147483648 and 2147483647 (inclusive).
For blocks, must be container. (BE: slot.container

Minecraft Armor Slots

) where or is replaced with a number specifying the slot.
  • Chests, dispensers, droppers, hoppers, and trapped chests are numbered 0 for the top-left slot and then increase first horizontally, then vertically (so, for example, a chest's top row slots are numbered 0 to 8 from left to right). Double chests and double trapped chests are treated as two single container blocks.
  • A brewing stand's bottom slots are numbered 0 to 2 from left to right, its top slot is 3 and the fuel slot is 4.
  • A furnace's slots are numbered 0 for the input slot, 1 for the fuel slot, and 2 for the output slot.
Other blocks which hold items but don't have inventory GUIs (flower pots and jukeboxes) can only be changed with /data.
Minecraft Armor Slot Id
For entities, must be one of the following, where slot number or slot id is replaced with a number specifying the slot:
SlotSlot NumbersRestrictions
armor.chest(BE: slot.armor.chest )any number‌[Bedrock Edition only]armor stands, mobs, and players only (though not all mobs will show or make use of the items)
armor.feet(BE: slot.armor.feet )any number‌[Bedrock Edition only]
armor.head(BE: slot.armor.head )any number‌[Bedrock Edition only]
armor.legs(BE: slot.armor.legs )any number‌[Bedrock Edition only]
weapon.mainhand(BE: slot.weapon.mainhand )any number‌[Bedrock Edition only]
weapon.offhand(BE: slot.weapon.offhand )any number‌[Bedrock Edition only]
container.(BE: slot.container )0–53players, item frames‌[Java Edition only] (slot 0), and minecarts only
enderchest.
(BE: slot.enderchest )
0–26players only
hotbar.
(BE: slot.hotbar )
0–8
inventory.
(BE: slot.inventory )
0–26
horse.saddle
(BE: slot.saddle )
any number‌[Bedrock Edition only]horses, donkeys, and mules only; or itemName: Item must be a saddle
horse.chest[Java Edition only]donkeys, and mules only; must be a chest
horse.armor
(BE: slot.armor )
any number‌[Bedrock Edition only]horses and llamas only; or itemName: Item must be a type of horse armor (if a horse) or a carpet (if a llama)
horse.
(BE: slot.chest )
0–14donkeys and mules with chests only
villager.
(BE: slot.inventory )
0–7villagers only

JE: : item_stack
BE: itemName: Item: CommandItem

Specifies the item to be placed in the block or entity's inventory slot.

JE: : integer
BE: amount: int: int

Must be a 32-bit integer number. In Java Edition, it must be between -2147483648 and 2147483647 (inclusive). And it must be between 1 and 64 (inclusive).
Specifies the number of items to be placed in the block or entity's inventory slot.

BE: data: int: int

Must be a 32-bit integer number. It must be between -2147483648 and 2147483647 (inclusive).
Specifies the item data for the item(s) to be placed in the block or entity's inventory slot. Values which are invalid for the specified item id will default to 0. If not specified, defaults to 0.

BE: components: json: Json::Value

Must be a JSON Object.
Specifies the item components. Like data tags but supports only minecraft:can_place_on, minecraft:can_destroy, minecraft:item_lock, and minecraft:keep_on_death functions (see Commands/give#Examples)
Minecraft Armor Slot Id

BE: oldItemHandling: ReplaceMode

Must be one of:
destroy - Directly replaces items ignoring the original items in the specified slot.
keep - Does not replace items if an item occupies that slot.

Result[edit]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Failed
exceeds the stack limit of the specified item Failed Successful
/replaceitem block ..if the specified block is not a container Failed
if the specified block does not have the specified slot
/replaceitem entity ..if or target: target fails to resolve to one or more entities (named players must be online)
if none of the targets have the specified slot (for example, zombies don't have horse.armor)
if specified item cannot be place into the specified slot of any targeted entity(for example, place a stone into armor.chest of a player)
/replaceitem .. keepif an item occupies the specified slot in keep mode N/A
anyOn successReplaces the items in the specified slot with the specified items (previous items in that slot are lost).

Output[edit]

CommandEditionSituationSuccess Count/execute store success ../execute store result ..
anyJava EditionOn fail000
/replaceitem block ..On success111
/replaceitem entity ..On success11the number of entities whose items are successfully replaced
anyBedrock EditionOn fail0N/AN/A
/replaceitem block ..On success1N/AN/A
/replaceitem entity ..On successthe number of entities whose items are successfully replacedN/AN/A

Examples[edit]

  • To replace the items in the bottom-right slot of a single chest two block above with four spruce saplings:
    • replaceitem block ~ ~2 ~ container.26 minecraft:spruce_sapling 4[Java Edition only]
    • replaceitem block ~ ~2 ~ slot.container 26 sapling 4 1[Bedrock Edition only]
  • To replace the items in the rightmost hotbar slot of the nearest player with four spruce saplings:
    • replaceitem entity @p hotbar.8 minecraft:spruce_sapling 4[Java Edition only]
    • replaceitem entity @p slot.hotbar 8 sapling 4 1[Bedrock Edition only]
Armor

History[edit]

Java Edition
1.814w26aAdded /replaceitem.
1.1418w43a/replaceitem can now be used on item frames.
Upcoming Java Edition
1.1720w46aRemoved /replaceitem. Replaced with /item replace.
Pocket Edition
1.0.5alpha 1.0.5.0Added /replaceitem.
1.1.0alpha 1.1.0.0CanPlaceOn and CanDestroy functions are now supported for /replaceitem.
Bedrock Edition
1.16.0beta 1.16.0.55 Added new overload for /replaceitem with an option for destroy or keep.
Armor

JE: : block_pos
BE: position: x y z: CommandPosition

In Java Edition, it must be a block position composed of , and , each of which must be an integer or tilde and caret notation.In Bedrock Edition, it must be a three-dimensional coordinates composed of , and , each of which must be a floating-point number or tilde and caret notation.
Specifies the position of the block to be modified.

JE: : entity
BE: target: target: CommandSelector

Minecraft Armor Slot Ids

Must be a player name, a target selector or a UUID‌[Java Edition only].
Specifies one or more entities to modify.

JE: : item_slot
BE: slotType: EntityEquipmentSlot: EquipmentSlot, slot.container and : int Texas holdem poker apple.

Specifies the inventory slot to be modified. Valid values depend on whether a block or an entity is being modified.
In Bedrock Edition, slotId: int must be a 32-bit integer number. And it must be between -2147483648 and 2147483647 (inclusive).
For blocks, must be container. (BE: slot.container

Minecraft Armor Slots

) where or is replaced with a number specifying the slot.
  • Chests, dispensers, droppers, hoppers, and trapped chests are numbered 0 for the top-left slot and then increase first horizontally, then vertically (so, for example, a chest's top row slots are numbered 0 to 8 from left to right). Double chests and double trapped chests are treated as two single container blocks.
  • A brewing stand's bottom slots are numbered 0 to 2 from left to right, its top slot is 3 and the fuel slot is 4.
  • A furnace's slots are numbered 0 for the input slot, 1 for the fuel slot, and 2 for the output slot.
Other blocks which hold items but don't have inventory GUIs (flower pots and jukeboxes) can only be changed with /data.
For entities, must be one of the following, where slot number or slot id is replaced with a number specifying the slot:
SlotSlot NumbersRestrictions
armor.chest(BE: slot.armor.chest )any number‌[Bedrock Edition only]armor stands, mobs, and players only (though not all mobs will show or make use of the items)
armor.feet(BE: slot.armor.feet )any number‌[Bedrock Edition only]
armor.head(BE: slot.armor.head )any number‌[Bedrock Edition only]
armor.legs(BE: slot.armor.legs )any number‌[Bedrock Edition only]
weapon.mainhand(BE: slot.weapon.mainhand )any number‌[Bedrock Edition only]
weapon.offhand(BE: slot.weapon.offhand )any number‌[Bedrock Edition only]
container.(BE: slot.container )0–53players, item frames‌[Java Edition only] (slot 0), and minecarts only
enderchest.
(BE: slot.enderchest )
0–26players only
hotbar.
(BE: slot.hotbar )
0–8
inventory.
(BE: slot.inventory )
0–26
horse.saddle
(BE: slot.saddle )
any number‌[Bedrock Edition only]horses, donkeys, and mules only; or itemName: Item must be a saddle
horse.chest[Java Edition only]donkeys, and mules only; must be a chest
horse.armor
(BE: slot.armor )
any number‌[Bedrock Edition only]horses and llamas only; or itemName: Item must be a type of horse armor (if a horse) or a carpet (if a llama)
horse.
(BE: slot.chest )
0–14donkeys and mules with chests only
villager.
(BE: slot.inventory )
0–7villagers only

JE: : item_stack
BE: itemName: Item: CommandItem

Specifies the item to be placed in the block or entity's inventory slot.

JE: : integer
BE: amount: int: int

Must be a 32-bit integer number. In Java Edition, it must be between -2147483648 and 2147483647 (inclusive). And it must be between 1 and 64 (inclusive).
Specifies the number of items to be placed in the block or entity's inventory slot.

BE: data: int: int

Must be a 32-bit integer number. It must be between -2147483648 and 2147483647 (inclusive).
Specifies the item data for the item(s) to be placed in the block or entity's inventory slot. Values which are invalid for the specified item id will default to 0. If not specified, defaults to 0.

BE: components: json: Json::Value

Must be a JSON Object.
Specifies the item components. Like data tags but supports only minecraft:can_place_on, minecraft:can_destroy, minecraft:item_lock, and minecraft:keep_on_death functions (see Commands/give#Examples)

BE: oldItemHandling: ReplaceMode

Must be one of:
destroy - Directly replaces items ignoring the original items in the specified slot.
keep - Does not replace items if an item occupies that slot.

Result[edit]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Failed
exceeds the stack limit of the specified item Failed Successful
/replaceitem block ..if the specified block is not a container Failed
if the specified block does not have the specified slot
/replaceitem entity ..if or target: target fails to resolve to one or more entities (named players must be online)
if none of the targets have the specified slot (for example, zombies don't have horse.armor)
if specified item cannot be place into the specified slot of any targeted entity(for example, place a stone into armor.chest of a player)
/replaceitem .. keepif an item occupies the specified slot in keep mode N/A
anyOn successReplaces the items in the specified slot with the specified items (previous items in that slot are lost).

Output[edit]

CommandEditionSituationSuccess Count/execute store success ../execute store result ..
anyJava EditionOn fail000
/replaceitem block ..On success111
/replaceitem entity ..On success11the number of entities whose items are successfully replaced
anyBedrock EditionOn fail0N/AN/A
/replaceitem block ..On success1N/AN/A
/replaceitem entity ..On successthe number of entities whose items are successfully replacedN/AN/A

Examples[edit]

  • To replace the items in the bottom-right slot of a single chest two block above with four spruce saplings:
    • replaceitem block ~ ~2 ~ container.26 minecraft:spruce_sapling 4[Java Edition only]
    • replaceitem block ~ ~2 ~ slot.container 26 sapling 4 1[Bedrock Edition only]
  • To replace the items in the rightmost hotbar slot of the nearest player with four spruce saplings:
    • replaceitem entity @p hotbar.8 minecraft:spruce_sapling 4[Java Edition only]
    • replaceitem entity @p slot.hotbar 8 sapling 4 1[Bedrock Edition only]

History[edit]

Java Edition
1.814w26aAdded /replaceitem.
1.1418w43a/replaceitem can now be used on item frames.
Upcoming Java Edition
1.1720w46aRemoved /replaceitem. Replaced with /item replace.
Pocket Edition
1.0.5alpha 1.0.5.0Added /replaceitem.
1.1.0alpha 1.1.0.0CanPlaceOn and CanDestroy functions are now supported for /replaceitem.
Bedrock Edition
1.16.0beta 1.16.0.55 Added new overload for /replaceitem with an option for destroy or keep.

See also[edit]

  • /blockdata — can also replace items in a container
  • /entitydata — can also replace items in a mob's inventory, or modify the drop chances of armor and weapons
  • /give — give items to players without specifying specific inventory slots or overwriting other items
Retrieved from 'https://minecraft.gamepedia.com/Commands/replaceitem?oldid=1781451'




broken image