Slot - minecraft.fandom.com
Jump to navigation
Jump to search
Treść tej podstrony pochodzi z artykułu „Slot” w domenie minecraft.fandom.com na licencji CC BY-NC-SA 3.0
A slot is a location in the data of a block entity or entity that an item stack can be placed in.
Java Edition[]
A slot is defined by its slot index.
Slot index Used by Description 0-53 General inventories Different containers have different ranges for the slot number: - 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.
- players: 0-35
- minecarts with chests: 0-26
- minecarts with hoppers: 0-4
- item frames and item display: 0
98-103 Mobs (all mobs support these slots though not all mobs will show or make use of the items), players, and armor stands - Head armor slot: 103
- Chest armor slot: 102
- Leg armor slot: 101
- Feet armor slot: 100
- Mainhand: 98
- Offhand: 99
200-226 Players Slots in ender chest 300-307 Villagers, wandering traders, pillagers Their inventory 400 Horses, donkeys, mules, llamas Slot for saddle item 401 Horses, llamas Slot for horse armor on horse or carpet on llama 499 Donkeys, llamas, mules with chest Slot for chest item 500-514 Donkeys, llamas, mules with chest Their inventory
Command argument[]
In commands, a slot should be referred by a string id instead of its index. The string id is mapped to its index when executing command.
A string id of slot consists of slot type and optional slot number, in the format of <slot_type> or <slot_type>.<slot_number>.
Slot string id Valid slot number Mapped index armor.chest102 armor.feet100 armor.head103 armor.legs101 weaponweapon.mainhandweapon.offhand-106 container.<slot_number>0-53 0-53 enderchest.<slot_number>0-26 200-226 hotbar.<slot_number>0-8 0-8 inventory.<slot_number>0-26 9-35 horse.saddle
400 horse.chest499 horse.armor401 horse.<slot_number>0-14 500-514 villager.<slot_number>0-7 300-307
Bedrock Edition[]
Command argument[]
In commands, a slot is referred by two arguments: slot type and slot number.
- For a block, its slot type is
slot.container.- 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.
- For entities:
Slot Type Slot Numbers Restrictions slot.weapon.mainhandany number (0 in hasitemselector)mobs (including armor stands), and players only (though not all mobs will show or make use of the items) slot.weapon.offhandany number (0 in hasitemselector)slot.armor.headany number (0 in hasitemselector)slot.armor.chestany number (0 in hasitemselector)slot.armor.legsany number (0 in hasitemselector)slot.armor.feetany number (0 in hasitemselector)slot.hotbar0–8 players only slot.inventory0–the number of slots in inventory entities with minecraft:inventorycomponent onlyslot.enderchest0–26 players only slot.saddleany number (0 in hasitemselector)horses, donkeys, and mules only; item in it can only be a saddle slot.armorany number (0 in hasitemselector)horses only; item in it can only be a horse armor slot.chest0–the number of slots in chest donkeys and mules with chests only slot.equippable0–the number of equippable slots entities with minecraft:equippablecomponent only. Note that these slot is also defined inminecraft:inventorycomponent.Unsupported in
/replaceitemand/loot
Slots of vanilla entities[]
| Name | Entity ID | slot .inventory |
slot .weapon .mainhand |
slot .weapon .offhand |
slot .equippable |
slot .armor |
slot .saddle |
slot .chest |
slot .enderchest |
slot .hotbar |
|---|---|---|---|---|---|---|---|---|---|---|
| Allay | allay
|
1 | 1 | 1, unused | No | No | No | No | No | No |
| Boat with Chest | boat_chest
|
27 | No | No | No | No | No | No | No | No |
| Donkey | donkey
|
16 (When tamed) | 1, unused | 1, unused | 1 (the slot of slot.saddle) | No | Slot 0 in slot.inventory (When tamed) | Slot 1-15 in slot.inventory (When tamed) | No | No |
| Drowned | drowned
|
No | 1 | 1 | No | No | No | No | No | No |
| Fox | fox
|
No | 1 | 1, unused | No | No | No | No | No | No |
| Horse | horse
|
2 (When tamed) | 1, unused | 1, unused | 2 (slot 0 is slot.saddle, 1 is slot.armor) | Slot 1 in slot.inventory (When tamed) | Slot 0 in slot.inventory(When tamed) | No | No | No |
| Husk | husk
|
No | 1 | 1 | No | No | No | No | No | No |
| Llama | llama
|
16 (When tamed) | 1, unused | 1, unused | 1 (the slot of slot.saddle) | No | No | No | No | No |
| Minecart with Chest | chest_minecart
|
27 | No | No | No | No | No | No | No | No |
| Minecart with Hopper | hopper_minecart
|
5 | No | No | No | No | No | No | No | No |
| Mule | mule
|
16 (When tamed) | 1, unused | 1, unused | 1 (the slot of slot.saddle) | No | Slot 0 in slot.inventory (When tamed) | Slot 1-15 in slot.inventory (When tamed) | No | No |
| Panda | panda
|
1 | 1 | 1, unused | No | No | No | No | No | No |
| Piglin | piglin
|
8 | 1 | 1 | No | No | No | No | No | No |
| Piglin Brute | piglin_brute
|
No | 1 | 1 | No | No | No | No | No | No |
| Player | player
|
27 | 1 from slot.hotbar | 1 | No | No | No | No | 27 | 9 |
| Skeleton | skeleton
|
No | 1 | 1 | No | No | No | No | No | No |
| Stray | stray
|
No | 1 | 1 | No | No | No | No | No | No |
| Villager | villager
|
8 | 1 | 1, unused | No | No | No | No | No | No |
| Zombie | zombie
|
No | 1 | 1 | No | No | No | No | No | No |
| Zombie Villager | zombie_villager
|
No | 1 | 1 | No | No | No | No | No | No |
History[]
This section of the article is empty.
You can help by adding to it.