Minecraft:Commands/clearslot: Difference between revisions
From SAS Gaming Wiki
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| (One intermediate revision by the same user not shown) | |||
| Line 16: | Line 16: | ||
Clears a slot of an entity | Clears a slot of an entity | ||
<code>/clearslot entity <target: target> <slotType: EntityEquipmentSlot> <slotId></code> | <code>/clearslot entity <target: target> <slotType: EntityEquipmentSlot> <slotId: int></code> | ||
==Arguments== | ==Arguments== | ||
| Line 74: | Line 74: | ||
==Examples== | ==Examples== | ||
* Clear the current main hand slot of | * Clear the current main hand slot of the player | ||
** <code>/clearslot entity @s slot.weapon.mainhand 0</code> | ** <code>/clearslot entity @s slot.weapon.mainhand 0</code> | ||
* Clear the first slot of a container | * Clear the first slot of a container | ||
Latest revision as of 11:08, 25 May 2026
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 player
/clearslot entity @s slot.weapon.mainhand 0
- Clear the first slot of a container
/clearslot 0 64 0 slot.container 0