Minecraft:Commands/clearslot
From SAS Gaming Wiki
More actions
Template:Outdated feature Template:Exclusive Template:Infobox command
Clears a specified slot of a specified entity or container. This includes any containers listed in Minecraft:Chest (disambiguation).
Syntax
Clears a slot from a container
/clearslot block <position: x y z> slot.container <slotId: int>
Clears a slot of an entity
/clearslot entity <target: target> <slotType: EntityEquipmentSlot> <slotId: int>
Arguments
- The coorindates of the container
- Template:Arg desc
- The entity to be targeted
- Template:Arg desc
- The slot type of the slot. This can be the following:
slot.armor- Armor slot for mobs with only 1 armor slot such as Minecraft:Horse
slot.armor.chest- Minecraft:Chestplate slot
slot.armor.feet- Minecraft:Boots slot
slot.armor.head- Minecraft:Helmet slot
slot.armor.legs- Minecraft:Leggings slot
slot.chest- Minecraft:Chest slots where the chest is equipped on mobs such as Minecraft:Donkey
slot.enderchest- Slots of a player's Minecraft:Ender Chest
slot.hotbar- A player's Minecraft:hotbar slot
slot.inventory- A player's Minecraft:inventory slot
slot.saddle- Minecraft:Saddle slot for mobs such as Minecraft:Pig
slot.weapon.mainhand- The main hand slot of a mob
- For players, this refers to the currently held item in the Minecraft:hotbar
slot.weapon.offhand- The off hand slot of a mob or player
- The slot ID of the specified slot type
- Template:Arg desc
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Examples
- Clear the current main hand slot of the the player
/clearslot entity @s slot.weapon.mainhand 0
- Clear the first slot of a container
/clearslot 0 64 0 slot.container 0