Template:Inventory
Note: this template should only be used if you want to show an Inventory, or a recipe with an inventory. If you only want to show a recipe, use its respective template, e.g. {{Furnace}}
General usage
To control the contents of the many slots of the inventory and other GUI components, the following parameters may be used.
| Common parameters | ||
|---|---|---|
| Parameter | Function | Default value |
| type | Required. The type of GUI to show. Except for the generic type, it always includes the player inventory. There are 7 different values this property can have, as detailed below. Click on a container type to learn more about it.
|
|
| title | The custom title to show on the GUI | the default title of the GUI |
| 1 – 9 | Hotbar item slots | |
| 10 – 18 | Top inventory row of item slots | |
| 19 – 27 | Middle inventory row of item slots | |
| 28 – 36 | Bottom inventory row of item slots | |
Types
Survival
The survival type configuration displays an inventory in survival mode.
| Parameters | ||
|---|---|---|
| Parameter | Function | Default value |
| offhand | Offhand item slot | |
| 103 | Head item slot | |
| 102 | Body item slot | |
| 101 | Legs item slot | |
| 100 | Feet item slot | |
| background | The background color of the player avatar preview area next to the armor slots | #000000 |
| A1, B1 | Top 2×2 crafting grid slots | |
| A2, B2 | Bottom 2×2 crafting grid slots | |
| Output | 2×2 Crafting grid output slot | |
| title | Note: This common parameter has no effect on the survival inventory. | |
Crafting Table
The crafting-table type configuration shows a crafting table's interface.
| Parameters | ||
|---|---|---|
| Parameter | Function | Default value |
| A1, B1, C1 | Top 3×3 crafting grid row of slots | |
| A2, B2, C2 | Middle 3×3 crafting grid row of slots | |
| A3, B3, C3 | Bottom 3×3 crafting grid row of slots | |
| Output | 3×3 Crafting grid output slot | |
Furnace
The furnace type configuration displays a furnace GUI.
| Parameters | ||
|---|---|---|
| Parameter | Function | Default value |
| Input | Furnace input slot | |
| Output | Furnace output slot | |
| lit | Whether or not to render the fire as lit ("true" means lit, not active otherwise) | false |
| Fuel | Furnace fuel item slot | |
Brewing Stand
The brewing-stand type configuration displays a brewing stand's GUI.
| Parameters | ||
|---|---|---|
| Parameter | Function | Default value |
| Fuel | Brewing fuel input item slot | |
| Input | Brewing input item slot | |
| Output1 | The left bottle item slot | |
| Output2 | The middle bottle item slot | |
| Output3 | The right bottle item slot | |
| fuel | Remaining fuel actions | 0 |
| progress | Brewing action progress | 0 |
Anvil
The anvil type configuration displays an anvil GUI.
| Parameters | ||
|---|---|---|
| Parameter | Function | Default value |
| text | The custom text filled into the textfield of the anvil | |
| Input1 | The left anvil input slot | |
| Input2 | The right anvil input slot | |
| Output | The anvil output slot | |
| crossed | Whether or not the anvil operation (arrow) should be rendered crossed out ("true" means crossed out, normal otherwise) | false |
| cost | The enchantment level cost of the anvil operation, any value or "expensive" | |
| expensive | Whether or not the anvil operation should be marked as too expensive ("true" means the text for the operation cost becomes dark red, bright green otherwise) | false |
Smithing Table
Legacy
The legacy-smithing type configuration displays the pre-1.20 smithing table GUI.
| Parameters | ||
|---|---|---|
| Parameter | Function | Default value |
| Input1 | The left input slot | |
| Input2 | The right input slot | |
| Output | The output slot | |
| crossed | Whether or not the arrow should be crossed out | false |
Examples
Survival inventory
{{Inventory
|type=survival
|1=[&b&oMystical Sword]Diamond Sword[&7Sharpness III/&7Looting III/&7Unbreaking VII/&7Mending//&9+9 Attack Damage]
|2=Diamond Axe
|3=Damaged Diamond Pickaxe
|4=Damaged Bow
|6=Arrow,52
|8=Oak Wood Planks,18
|9=Stick,12
|10=Cobblestone,64
|11=Cobblestone,64
|12=Cobblestone,13
|36=Diamond,43
|A1=Charcoal,17
|A2=Stick,20
|Output=Torch,4
|offhand=Totem of Undying
|103=Diamond Helmet
|102=Broken Elytra
|101=Diamond Leggings
|100=Diamond Boots
}}
- Result
Crafting table
{{Inventory
|type=crafting-table
|A1= |B1=Blaze Powder |C1=
|A2= |B2=Coal,Charcoal |C2=
|A3= |B3=Gunpowder |C3=
|Output=Fire Charge,3
|9=Obsidian,99
}}
- Result
Furnace
{{Inventory
|type=furnace
|lit=true
|1=Damaged Wooden Axe
|2=Damaged Stone Pickaxe
|13=Granite,24
|Fuel=Stripped Dark Oak Log,14
|Input=Raw Salmon,8
|Output=Cooked Salmon,56}}
- Result
Brewing stand
{{Inventory
|type=brewing-stand
|title=Magic Stand
|fuel=64
|progress=50
|Fuel=Blaze Powder,13
|Input=Nether Wart
|Output1=Awkward Potion
|Output2=Lingering Potion of Night Vision
|Output3=Antidote
}}
- Result
Inventory
Anvil
{{Inventory
|type=anvil
|text=Mystical Sword
|crossed=true
|cost=28
|expensive=true
|1=Damaged Diamond Axe
|2=Damaged Diamond Pickaxe
|3=Damaged Bow
|5=Arrow,52
|8=Stick,12
|9=Cobblestone,64
|10=Cobblestone,64
|11=Cobblestone,13
|35=Diamond,43
|Input1=[&b]Diamond Sword[&7Unbreaking VII/&7Mending]
|Input2=Enchanted Book[&7Sharpness III/&7Looting III]
|Output=[&b&oMystical Sword]Diamond Sword[&7Sharpness III/&7Looting III/&7Unbreaking VII/&7Mending//&9+9 Attack Damage]
}}
- Result
Smithing Table
Legacy
{{Inventory
|type=legacy-smithing
|Input1=Diamond Sword
|Input2=Netherite Ingot
|Output=Netherite Sword
|crossed=true
}}
- Result
See also
{{Crafting Table}}{{Inventory Table}}{{Furnace}}{{Brewing Stand}}{{Stonecutter}}{{Loom}}{{Grindstone}}{{Hotbar}}{{Smithing Table}}{{Legacy Smithing Table}}{{Anvil}}{{Inventory slot}}{{Inventory}}- Module:UI