Difference between revisions of "Inventory"
(Add images for each other slot.) |
(→Crafting table: Revert to old slot assignments which turned out to be correct) |
||
(30 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
− | Minecraft displays the '''player inventory''' differently, according to how the window was opened. Ranges of slot indices vary in meaning between different “windows”. The [[Protocol# | + | Minecraft displays the '''player inventory''' differently, according to how the window was opened. Ranges of slot indices vary in meaning between different “windows”. The [[Protocol#Open_Screen|Open Screen]] packet indicates which window is being opened according to: |
<div style="float:right;">__TOC__</div> | <div style="float:right;">__TOC__</div> | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! | + | ! Type |
+ | ! Name | ||
! Description | ! Description | ||
|- | |- | ||
− | | minecraft: | + | | 0 |
− | | {{Minecraft Wiki|Chest}}, | + | | minecraft:generic_9x1 |
+ | | A 1-row inventory, not used by the notchian server. | ||
+ | |- | ||
+ | | 1 | ||
+ | | minecraft:generic_9x2 | ||
+ | | A 2-row inventory, not used by the notchian server. | ||
+ | |- | ||
+ | | 2 | ||
+ | | minecraft:generic_9x3 | ||
+ | | General-purpose 3-row inventory. Used by {{Minecraft Wiki|Chest}}, {{Minecraft Wiki|minecart with chest}}, {{Minecraft Wiki|ender chest}}, and {{Minecraft Wiki|barrel}} | ||
+ | |- | ||
+ | | 3 | ||
+ | | minecraft:generic_9x4 | ||
+ | | A 4-row inventory, not used by the notchian server. | ||
+ | |- | ||
+ | | 4 | ||
+ | | minecraft:generic_9x5 | ||
+ | | A 5-row inventory, not used by the notchian server. | ||
+ | |- | ||
+ | | 5 | ||
+ | | minecraft:generic_9x6 | ||
+ | | General-purpose 6-row inventory, used by large chests. | ||
+ | |- | ||
+ | | 6 | ||
+ | | minecraft:generic_3x3 | ||
+ | | General-purpose 3-by-3 square inventory, used by {{Minecraft Wiki|Dispenser}} and {{Minecraft Wiki|Dropper}} | ||
|- | |- | ||
− | | minecraft: | + | | 7 |
− | | {{Minecraft Wiki| | + | | minecraft:crafter_3x3 |
+ | | General-purpose 3-by-3 square inventory, used by the {{Minecraft Wiki|Crafter}} | ||
|- | |- | ||
− | | minecraft: | + | | 8 |
− | | {{Minecraft Wiki| | + | | minecraft:anvil |
+ | | {{Minecraft Wiki|Anvil}} | ||
|- | |- | ||
− | | minecraft: | + | | 9 |
− | | {{Minecraft Wiki| | + | | minecraft:beacon |
+ | | {{Minecraft Wiki|Beacon}} | ||
|- | |- | ||
− | | minecraft: | + | | 10 |
− | | {{Minecraft Wiki| | + | | minecraft:blast_furnace |
+ | | {{Minecraft Wiki|Blast Furnace}} | ||
|- | |- | ||
+ | | 11 | ||
| minecraft:brewing_stand | | minecraft:brewing_stand | ||
| {{Minecraft Wiki|Brewing stand}} | | {{Minecraft Wiki|Brewing stand}} | ||
|- | |- | ||
− | | minecraft: | + | | 12 |
− | | {{Minecraft Wiki| | + | | minecraft:crafting |
+ | | {{Minecraft Wiki|Crafting table}} | ||
|- | |- | ||
− | | minecraft: | + | | 13 |
− | | {{Minecraft Wiki| | + | | minecraft:enchantment |
+ | | {{Minecraft Wiki|Enchantment table}} | ||
+ | |- | ||
+ | | 14 | ||
+ | | minecraft:furnace | ||
+ | | {{Minecraft Wiki|Furnace}} | ||
|- | |- | ||
− | | minecraft: | + | | 15 |
− | | {{Minecraft Wiki| | + | | minecraft:grindstone |
+ | | {{Minecraft Wiki|Grindstone}} | ||
|- | |- | ||
+ | | 16 | ||
| minecraft:hopper | | minecraft:hopper | ||
| {{Minecraft Wiki|Hopper}} or {{Minecraft Wiki|minecart with hopper}} | | {{Minecraft Wiki|Hopper}} or {{Minecraft Wiki|minecart with hopper}} | ||
|- | |- | ||
− | | minecraft: | + | | 17 |
− | | {{Minecraft Wiki| | + | | minecraft:lectern |
− | |- | + | | {{Minecraft Wiki|Lectern}} |
− | | | + | |- |
− | | {{Minecraft Wiki| | + | | 18 |
+ | | minecraft:loom | ||
+ | | {{Minecraft Wiki|Loom}} | ||
+ | |- | ||
+ | | 19 | ||
+ | | minecraft:merchant | ||
+ | | {{Minecraft Wiki|Villager}}, {{Minecraft Wiki|Wandering Trader}} | ||
+ | |- | ||
+ | | 20 | ||
+ | | minecraft:shulker_box | ||
+ | | {{Minecraft Wiki|Shulker box}} | ||
+ | |- | ||
+ | | 21 | ||
+ | | minecraft:smithing | ||
+ | | {{Minecraft Wiki|Smithing Table}} | ||
+ | |- | ||
+ | | 22 | ||
+ | | minecraft:smoker | ||
+ | | {{Minecraft Wiki|Smoker}} | ||
+ | |- | ||
+ | | 23 | ||
+ | | minecraft:cartography | ||
+ | | {{Minecraft Wiki|Cartography Table}} | ||
+ | |- | ||
+ | | 24 | ||
+ | | minecraft:stonecutter | ||
+ | | {{Minecraft Wiki|Stonecutter}} | ||
|} | |} | ||
+ | |||
+ | |||
+ | {{Need Info|Most of the inventories new to 1.14 have buttons, which are ''probably'' implemented using [[Protocol#Click Window Button]]. This needs to be confirmed and the button IDs should be checked.}} | ||
The slot number is calculated starting at 0, counting up through the window's unique slots, and then counting through the players inventory. | The slot number is calculated starting at 0, counting up through the window's unique slots, and then counting through the players inventory. | ||
Line 49: | Line 116: | ||
For all windows, the slot in the upper-left corner of the player's inventory is slot ''n'' where ''n'' is the number of unique slots, and slot number -999 is always used for clicking outside the window. | For all windows, the slot in the upper-left corner of the player's inventory is slot ''n'' where ''n'' is the number of unique slots, and slot number -999 is always used for clicking outside the window. | ||
− | + | The default inventory window, which is never explicitly opened by the server, has 10 unique slots. | |
− | |||
− | The default inventory window, which is never explicitly opened by the server, has | ||
Rectangular regions are always indexed starting with the upper-left corner and scanning across rows. If a window has a crafting region, the output slot is always slot 0 followed immediately by the input region. | Rectangular regions are always indexed starting with the upper-left corner and scanning across rows. If a window has a crafting region, the output slot is always slot 0 followed immediately by the input region. | ||
Line 86: | Line 151: | ||
| 36–44 | | 36–44 | ||
| hotbar | | hotbar | ||
+ | |- | ||
+ | | 45 | ||
+ | | Offhand slot | ||
|} | |} | ||
Line 112: | Line 180: | ||
|} | |} | ||
− | + | {{-}} | |
[[File:DoubleChest-slots.png|thumb|Double/large chest slots]] | [[File:DoubleChest-slots.png|thumb|Double/large chest slots]] | ||
+ | |||
+ | === Large chest === | ||
This is the window that is opened when the player right-clicks on a double chest block (two adjacent chest blocks). | This is the window that is opened when the player right-clicks on a double chest block (two adjacent chest blocks). | ||
Line 132: | Line 202: | ||
| hotbar | | hotbar | ||
|} | |} | ||
− | |||
− | |||
{{-}} | {{-}} | ||
Line 165: | Line 233: | ||
[[File:Furnace-slots.png|thumb|Furnace slots]] | [[File:Furnace-slots.png|thumb|Furnace slots]] | ||
+ | |||
+ | The window that appears when a furnace is right-clicked. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | ingredient | ||
+ | |- | ||
+ | | 1 | ||
+ | | fuel | ||
+ | |- | ||
+ | | 2 | ||
+ | | output | ||
+ | |- | ||
+ | | 3–29 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 30–38 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | === Blast Furnace === | ||
+ | [[File:1.14-blast_furnace-slots.png|thumb|Blast Furnace slots]] | ||
+ | |||
+ | The GUI that appears when a blast furnace is opened. Same layout as a furnace; however, the recipe book displays blast furnace recipes instead of regular furnace recipes. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | ingredient | ||
+ | |- | ||
+ | | 1 | ||
+ | | fuel | ||
+ | |- | ||
+ | | 2 | ||
+ | | output | ||
+ | |- | ||
+ | | 3–29 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 30–38 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | === Smoker === | ||
+ | [[File:1.14-smoker-slots.png|thumb|Smoker slots]] | ||
+ | |||
+ | The GUI that appears when a smoker is opened. Same layout as a furnace; however, the recipe book displays smoker recipes instead of regular furnace recipes. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 193: | Line 319: | ||
[[File:Dispenser-slots.png|thumb|Dispenser/dropper slots]] | [[File:Dispenser-slots.png|thumb|Dispenser/dropper slots]] | ||
+ | |||
+ | The inventory that appears when a dispenser or dropper is opened. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 214: | Line 342: | ||
[[File:EnchantmentTable-slots.png|thumb|Enchantment table slots]] | [[File:EnchantmentTable-slots.png|thumb|Enchantment table slots]] | ||
+ | |||
+ | The inventory of an enchantment table. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 237: | Line 367: | ||
== Brewing stand == | == Brewing stand == | ||
− | [[File:BrewingStand-slots.png|thumb| | + | [[File:BrewingStand-slots.png|thumb|Brewing stand slots]] |
+ | |||
+ | The GUI that appears when a brewing stand is opened. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0-2 | ||
+ | | bottles/potions | ||
+ | |- | ||
+ | | 3 | ||
+ | | potion ingredient | ||
+ | |- | ||
+ | | 4 | ||
+ | | blaze powder | ||
+ | |- | ||
+ | | 5-31 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 32-40 | ||
+ | | hotbar | ||
+ | |} | ||
{{-}} | {{-}} | ||
Line 243: | Line 396: | ||
== Villager trading == | == Villager trading == | ||
− | [[File: | + | [[File:1.14-merchant-slots.png|thumb|Merchant slots]] |
+ | |||
+ | The GUI that appears when a villager is right-clicked. Note that if the villager only requires one item, you can put it in either (or both) slots. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0-1 | ||
+ | | input items | ||
+ | |- | ||
+ | | 2 | ||
+ | | result | ||
+ | |- | ||
+ | | 3–29 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 30–38 | ||
+ | | hotbar | ||
+ | |} | ||
{{-}} | {{-}} | ||
Line 250: | Line 423: | ||
[[File:Beacon-slots.png|thumb|Beacon slots]] | [[File:Beacon-slots.png|thumb|Beacon slots]] | ||
+ | |||
+ | The window that appears when a beacon is right-clicked. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | payment item | ||
+ | |- | ||
+ | | 1–27 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 28–36 | ||
+ | | hotbar | ||
+ | |} | ||
{{-}} | {{-}} | ||
Line 256: | Line 446: | ||
[[File:Anvil-slots.png|thumb|Anvil slots]] | [[File:Anvil-slots.png|thumb|Anvil slots]] | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | first item | ||
+ | |- | ||
+ | | 1 | ||
+ | | second item | ||
+ | |- | ||
+ | | 2 | ||
+ | | result | ||
+ | |- | ||
+ | | 3–29 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 30–38 | ||
+ | | hotbar | ||
+ | |} | ||
{{-}} | {{-}} | ||
Line 261: | Line 472: | ||
== Hopper == | == Hopper == | ||
− | [[File: | + | [[File:Hopper-slots.png|thumb|Hopper slots]] |
+ | |||
+ | The window that appears when a hopper or hopper minecart is opened. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0-4 | ||
+ | | hopper slots | ||
+ | |- | ||
+ | | 5–31 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 32–40 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | == Shulker box == | ||
+ | [[File:Shulker-box-slots.png|thumb|Shulker box slots]] | ||
+ | |||
+ | This is the window that is opened when the player right-clicks on a shulker box chest. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0–26 | ||
+ | | box slots | ||
+ | |- | ||
+ | | 27–53 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 54–62 | ||
+ | | hotbar | ||
+ | |} | ||
{{-}} | {{-}} | ||
+ | |||
+ | == Llama == | ||
+ | [[File:Llama-strength5-slots.png|thumb|Llama slots]] | ||
+ | |||
+ | The inventory that appears when a tamed llama is right-clicked and has a chest, or when the player's inventory is opened while riding a tamed llama. Depending on the value of the strength field, the number of chest rows may vary (max is 5, so 15 slots). | ||
+ | |||
+ | {{warning|There still is a saddle slot, even though it cannot be used and is invisible.}} | ||
+ | |||
+ | {{warning|Slot positions within the llama inventory vary - slot 2 may be at (1,0) or at (0,1) depending on the number of columns.}} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | saddle | ||
+ | |- | ||
+ | | 1 | ||
+ | | carpet | ||
+ | |- | ||
+ | | 2-(2+3*Strength) | ||
+ | | llama inventory | ||
+ | |- | ||
+ | | (2+3*Strength)+1-(2+3*Strength)+27 | ||
+ | | player inventory | ||
+ | |- | ||
+ | | (2+3*Strength)+28-(2+3*Strength)+35 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | <gallery> | ||
+ | File:Llama-unchested-slots.png|Unchested llama | ||
+ | File:Llama-strength1-slots.png|Llama with strength 1 | ||
+ | File:Llama-strength2-slots.png|Llama with strength 2 | ||
+ | File:Llama-strength3-slots.png|Llama with strength 3 | ||
+ | File:Llama-strength4-slots.png|Llama with strength 4 | ||
+ | File:Llama-strength5-slots.png|Llama with strength 5 | ||
+ | </gallery> | ||
== Horse == | == Horse == | ||
[[File:Horse-slots.png|thumb|Horse slots]] | [[File:Horse-slots.png|thumb|Horse slots]] | ||
+ | |||
+ | The window for when a tamed horse is right-clicked or the player's inventory is opened while riding a horse. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | saddle | ||
+ | |- | ||
+ | | 1 | ||
+ | | armor | ||
+ | |- | ||
+ | | 2–28 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 29–37 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | <gallery> | ||
+ | File:Horse-slots.png|Horse slots | ||
+ | File:Skeleton-horse-slots.png|Skeleton horse slots | ||
+ | File:Zombie-horse-slots.png|Zombie horse slots | ||
+ | </gallery> | ||
{{-}} | {{-}} | ||
Line 274: | Line 589: | ||
[[File:Donkey-slots.png|thumb|Donkey slots]] | [[File:Donkey-slots.png|thumb|Donkey slots]] | ||
+ | |||
+ | The inventory that appears when a tamed donkey (or mule?) is right-clicked, or when the player's inventory is opened while riding a tamed donkey or mule. | ||
+ | |||
+ | {{warning|There still is an armor slot, even though it cannot be used and is invisible.}} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | saddle | ||
+ | |- | ||
+ | | 1 | ||
+ | | armor | ||
+ | |- | ||
+ | | 2–16 | ||
+ | | donkey inventory | ||
+ | |- | ||
+ | | 17–43 (2-28 if unchested) | ||
+ | | player inventory | ||
+ | |- | ||
+ | | 44–52 (29-37 if unchested) | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | <gallery> | ||
+ | File:Donkey-unchested-slots.png|Unchested donkey | ||
+ | File:Donkey-chested-slots.png|Chested donkey | ||
+ | File:Mule-unchested-slots.png|Unchested mule | ||
+ | File:Mule-chested-slots.png|Chested mule | ||
+ | </gallery> | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | == Cartography Table == | ||
+ | [[File:1.14-cartography-slots.png|thumb|Cartography table slots]] | ||
+ | |||
+ | The inventory that appears when a cartography table is opened. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | map | ||
+ | |- | ||
+ | | 1 | ||
+ | | paper | ||
+ | |- | ||
+ | | 2 | ||
+ | | output | ||
+ | |- | ||
+ | | 3–29 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 30–38 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | == Grindstone == | ||
+ | [[File:1.14-grindstone-slots.png|thumb|Grindstone slots]] | ||
+ | |||
+ | The inventory that appears when a grindstone is opened. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | first item | ||
+ | |- | ||
+ | | 1 | ||
+ | | second item | ||
+ | |- | ||
+ | | 2 | ||
+ | | result | ||
+ | |- | ||
+ | | 3–29 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 30–38 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | == Lectern == | ||
+ | [[File:1.14-lectern.png|thumb|Lectern UI]] | ||
+ | |||
+ | The interface that appears when a lectern with a book is opened. The book is shown through the same interface as the one of [[Protocol#Open_Book|Open Book]], minus the extra controls. | ||
+ | |||
+ | The player inventory is not included. | ||
+ | |||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | book | ||
+ | |} | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | == Loom == | ||
+ | [[File:1.14-loom-slots.png|thumb|Loom slots]] | ||
+ | |||
+ | The inventory that appears when a loom is opened. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | banner | ||
+ | |- | ||
+ | | 1 | ||
+ | | dye | ||
+ | |- | ||
+ | | 2 | ||
+ | | pattern | ||
+ | |- | ||
+ | | 3 | ||
+ | | result | ||
+ | |- | ||
+ | | 4–30 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 31–39 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | == Stonecutter == | ||
+ | [[File:1.14-stonecutter-slots.png|thumb|Stonecutter slots]] | ||
+ | |||
+ | The inventory that appears when a stonecutter is opened. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | input | ||
+ | |- | ||
+ | | 1 | ||
+ | | result | ||
+ | |- | ||
+ | | 2–28 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 29–37 | ||
+ | | hotbar | ||
+ | |} | ||
+ | |||
+ | {{-}} | ||
+ | |||
+ | == Smithing Table== | ||
+ | [[File:1.20-smithing-table-slots.png|thumb|Smithing Table slots]] | ||
+ | |||
+ | The inventory that appears when a smithing table is opened. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Slot range | ||
+ | ! Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | template | ||
+ | |- | ||
+ | | 1 | ||
+ | | base item | ||
+ | |- | ||
+ | | 2 | ||
+ | | additional item | ||
+ | |- | ||
+ | | 3 | ||
+ | | result | ||
+ | |- | ||
+ | | 4–30 | ||
+ | | main inventory | ||
+ | |- | ||
+ | | 31–39 | ||
+ | | hotbar | ||
+ | |} | ||
{{-}} | {{-}} | ||
+ | [[Category:Protocol Details]] | ||
[[Category:Minecraft Modern]] | [[Category:Minecraft Modern]] |
Latest revision as of 13:49, 22 March 2024
Minecraft displays the player inventory differently, according to how the window was opened. Ranges of slot indices vary in meaning between different “windows”. The Open Screen packet indicates which window is being opened according to:
Type | Name | Description |
---|---|---|
0 | minecraft:generic_9x1 | A 1-row inventory, not used by the notchian server. |
1 | minecraft:generic_9x2 | A 2-row inventory, not used by the notchian server. |
2 | minecraft:generic_9x3 | General-purpose 3-row inventory. Used by Chest, minecart with chest, ender chest, and barrel |
3 | minecraft:generic_9x4 | A 4-row inventory, not used by the notchian server. |
4 | minecraft:generic_9x5 | A 5-row inventory, not used by the notchian server. |
5 | minecraft:generic_9x6 | General-purpose 6-row inventory, used by large chests. |
6 | minecraft:generic_3x3 | General-purpose 3-by-3 square inventory, used by Dispenser and Dropper |
7 | minecraft:crafter_3x3 | General-purpose 3-by-3 square inventory, used by the Crafter |
8 | minecraft:anvil | Anvil |
9 | minecraft:beacon | Beacon |
10 | minecraft:blast_furnace | Blast Furnace |
11 | minecraft:brewing_stand | Brewing stand |
12 | minecraft:crafting | Crafting table |
13 | minecraft:enchantment | Enchantment table |
14 | minecraft:furnace | Furnace |
15 | minecraft:grindstone | Grindstone |
16 | minecraft:hopper | Hopper or minecart with hopper |
17 | minecraft:lectern | Lectern |
18 | minecraft:loom | Loom |
19 | minecraft:merchant | Villager, Wandering Trader |
20 | minecraft:shulker_box | Shulker box |
21 | minecraft:smithing | Smithing Table |
22 | minecraft:smoker | Smoker |
23 | minecraft:cartography | Cartography Table |
24 | minecraft:stonecutter | Stonecutter |
The following information needs to be added to this page: | |
Most of the inventories new to 1.14 have buttons, which are probably implemented using Protocol#Click Window Button. This needs to be confirmed and the button IDs should be checked. |
The slot number is calculated starting at 0, counting up through the window's unique slots, and then counting through the players inventory.
For all windows, the slot in the upper-left corner of the player's inventory is slot n where n is the number of unique slots, and slot number -999 is always used for clicking outside the window.
The default inventory window, which is never explicitly opened by the server, has 10 unique slots.
Rectangular regions are always indexed starting with the upper-left corner and scanning across rows. If a window has a crafting region, the output slot is always slot 0 followed immediately by the input region.
Each window type is described in the following sections. All slot index ranges are inclusive and reflect the indices observed in the Minecraft protocol.
For the window properties (additional data in each window, e.g. smelting progress or enchantments), refer to the table in the Window Property packet.
Using -1 as slot index and as window id will set the cursor item (the stack dragged with the mouse).
Player Inventory
This is the inventory window that the player can always open, typically by pressing E since Beta 1.4. Before, you had to press I.
Slot range | Description |
---|---|
0 | crafting output |
1–4 | 2×2 crafting input (1 + x + 2 * y) |
5–8 | armor (head, chest, legs, feet) |
9–35 | main inventory |
36–44 | hotbar |
45 | Offhand slot |
Note that this is different from inventory items stored in a player.dat file. This may help: https://gist.github.com/459a1691c3dd751db160
Chest
This is the window that is opened when the player right-clicks on a single chest block.
Slot range | Description |
---|---|
0–26 | chest |
27–53 | main inventory |
54–62 | hotbar |
Large chest
This is the window that is opened when the player right-clicks on a double chest block (two adjacent chest blocks).
Slot range | Description |
---|---|
0–53 | chest |
54–80 | main inventory |
81–89 | hotbar |
Crafting table
This is the window that is opened when the player right-clicks on a workbench.
Slot range | Description |
---|---|
0 | crafting output |
1–9 | 3×3 crafting input (1 + x + 3 * y) |
10–36 | main inventory |
37–45 | hotbar |
Furnace
The window that appears when a furnace is right-clicked.
Slot range | Description |
---|---|
0 | ingredient |
1 | fuel |
2 | output |
3–29 | main inventory |
30–38 | hotbar |
Blast Furnace
The GUI that appears when a blast furnace is opened. Same layout as a furnace; however, the recipe book displays blast furnace recipes instead of regular furnace recipes.
Slot range | Description |
---|---|
0 | ingredient |
1 | fuel |
2 | output |
3–29 | main inventory |
30–38 | hotbar |
Smoker
The GUI that appears when a smoker is opened. Same layout as a furnace; however, the recipe book displays smoker recipes instead of regular furnace recipes.
Slot range | Description |
---|---|
0 | ingredient |
1 | fuel |
2 | output |
3–29 | main inventory |
30–38 | hotbar |
Dispenser
The inventory that appears when a dispenser or dropper is opened.
Slot range | Description |
---|---|
0–8 | 3×3 dispenser contents (x + 3 * y) |
9–35 | main inventory |
36-44 | hotbar |
Enchantment Table
The inventory of an enchantment table.
Slot range | Description |
---|---|
0 | item to enchant |
1 | lapis lazuli slot |
2–28 | main inventory |
29–37 | hotbar |
Brewing stand
The GUI that appears when a brewing stand is opened.
Slot range | Description |
---|---|
0-2 | bottles/potions |
3 | potion ingredient |
4 | blaze powder |
5-31 | main inventory |
32-40 | hotbar |
Villager trading
The GUI that appears when a villager is right-clicked. Note that if the villager only requires one item, you can put it in either (or both) slots.
Slot range | Description |
---|---|
0-1 | input items |
2 | result |
3–29 | main inventory |
30–38 | hotbar |
Beacon
The window that appears when a beacon is right-clicked.
Slot range | Description |
---|---|
0 | payment item |
1–27 | main inventory |
28–36 | hotbar |
Anvil
Slot range | Description |
---|---|
0 | first item |
1 | second item |
2 | result |
3–29 | main inventory |
30–38 | hotbar |
Hopper
The window that appears when a hopper or hopper minecart is opened.
Slot range | Description |
---|---|
0-4 | hopper slots |
5–31 | main inventory |
32–40 | hotbar |
Shulker box
This is the window that is opened when the player right-clicks on a shulker box chest.
Slot range | Description |
---|---|
0–26 | box slots |
27–53 | main inventory |
54–62 | hotbar |
Llama
The inventory that appears when a tamed llama is right-clicked and has a chest, or when the player's inventory is opened while riding a tamed llama. Depending on the value of the strength field, the number of chest rows may vary (max is 5, so 15 slots).
There still is a saddle slot, even though it cannot be used and is invisible.
Slot positions within the llama inventory vary - slot 2 may be at (1,0) or at (0,1) depending on the number of columns.
Slot range | Description |
---|---|
0 | saddle |
1 | carpet |
2-(2+3*Strength) | llama inventory |
(2+3*Strength)+1-(2+3*Strength)+27 | player inventory |
(2+3*Strength)+28-(2+3*Strength)+35 | hotbar |
Horse
The window for when a tamed horse is right-clicked or the player's inventory is opened while riding a horse.
Slot range | Description |
---|---|
0 | saddle |
1 | armor |
2–28 | main inventory |
29–37 | hotbar |
Donkey
The inventory that appears when a tamed donkey (or mule?) is right-clicked, or when the player's inventory is opened while riding a tamed donkey or mule.
There still is an armor slot, even though it cannot be used and is invisible.
Slot range | Description |
---|---|
0 | saddle |
1 | armor |
2–16 | donkey inventory |
17–43 (2-28 if unchested) | player inventory |
44–52 (29-37 if unchested) | hotbar |
Cartography Table
The inventory that appears when a cartography table is opened.
Slot range | Description |
---|---|
0 | map |
1 | paper |
2 | output |
3–29 | main inventory |
30–38 | hotbar |
Grindstone
The inventory that appears when a grindstone is opened.
Slot range | Description |
---|---|
0 | first item |
1 | second item |
2 | result |
3–29 | main inventory |
30–38 | hotbar |
Lectern
The interface that appears when a lectern with a book is opened. The book is shown through the same interface as the one of Open Book, minus the extra controls.
The player inventory is not included.
Slot range | Description |
---|---|
0 | book |
Loom
The inventory that appears when a loom is opened.
Slot range | Description |
---|---|
0 | banner |
1 | dye |
2 | pattern |
3 | result |
4–30 | main inventory |
31–39 | hotbar |
Stonecutter
The inventory that appears when a stonecutter is opened.
Slot range | Description |
---|---|
0 | input |
1 | result |
2–28 | main inventory |
29–37 | hotbar |
Smithing Table
The inventory that appears when a smithing table is opened.
Slot range | Description |
---|---|
0 | template |
1 | base item |
2 | additional item |
3 | result |
4–30 | main inventory |
31–39 | hotbar |