Script error: The function "docPage" does not exist.
This template is used to create an interface which looks similar in-game containers and inventories.
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. Always includes player inventory. Can be any value from the table headers below | |
| title | The custom title to show on the GUI | the default title of the GUI |
| scale | The magnification level (size) of the resulting element (doesn't work in Firefox or on Android) | 1 |
| inventory | Whether or not the player inventory is to be shown ("no" means hidden, unhidden otherwise) | yes |
| 0 – 8 | Hotbar item slots | |
| 9 – 17 | Top inventory row of item slots | |
| 18 – 26 | Middle inventory row of item slots | |
| 27 – 35 | Bottom inventory row of item slots | |
- Recognised arguments for required parameter
type survivalchestlarge-chestfurnaceanvilsmithing-tabledispenserhoppercrafting-tablebrewing-standgeneric
Specifications for Various GUI Types
type=survival parameters
| ||
|---|---|---|
| Parameter | Function | Default value |
| -106 | 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 |
| player | The image of the player avatar preview area, must be 98 × 140 pixels | Steve inventory.png |
| recipebook | Recipebook button item | Recipe Book |
| 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. | |
type=chest parameters
| ||
|---|---|---|
| Parameter | Function | Default value |
| C0 – C8 | Top chest row of item slots | |
| C9 – C17 | Middle chest row of item slots | |
| C18 – C26 | Bottom chest row of item slots | |
type=large-chest parameters
| ||
|---|---|---|
| Parameter | Function | Default value |
| C0 – C8 | Chest row 1 of item slots | |
| C9 – C17 | Chest row 2 of item slots | |
| C18 – C26 | Chest row 3 of item slots | |
| C27 – C35 | Chest row 4 of item slots | |
| C36 – C44 | Chest row 5 of item slots | |
| C45 – C53 | Chest row 6 of item slots | |
type=furnace 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 | |
| recipebook | Recipebook button item | Recipe Book |
type=anvil 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 |
type=smithing-table 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 (as type=anvil) |
false |
type=dispenser parameters
| ||
|---|---|---|
| Parameter | Function | Default value |
| D0 – D2 | Top dispenser row of item slots | |
| D3 – D5 | Middle dispenser row of item slots | |
| D6 – D8 | Bottom dispenser row of item slots | |
type=hopper parameters
| ||
|---|---|---|
| Parameter | Function | Default value |
| H0 – H4 | Hopper item slots | |
type=crafting-table 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 | |
| recipebook | Recipebook button item | Recipe Book |
type=brewing-stand 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 |
type=generic parameters
| ||
|---|---|---|
| Parameter | Function | Default value |
| rows | The number of rows to show (max is 16). | 1 |
| 0 – 143 | Available item slots. | |
Examples
Survival inventory
{{Inventory
|type=survival
|0=[&b&oMystical Sword]Diamond Sword[&7Sharpness III/&7Looting III/&7Unbreaking VII/&7Mending//&9+9 Attack Damage]
|1=Diamond Axe
|2=Damaged Diamond Pickaxe
|3=Damaged Bow
|5=Arrow,52
|7=Oak Wood Planks,18
|8=Stick,12
|9=Cobblestone,64
|10=Cobblestone,64
|11=Cobblestone,13
|35=Diamond,43
|A1=Charcoal,17
|A2=Stick,20
|Output=Torch,4
|-106=Totem of Undying
|103=Diamond Helmet
|102=Broken Elytra
|101=Diamond Leggings
|100=Diamond Boots
}}
- Result
{{
- vardefine: inventory-title
|
| {{#vardefineecho: string |
{{#explode: survival | - | {{#var: index}}}}
}}
| Expression error: Unrecognised punctuation character "{".{{#var: string}}{{#vardefine: index | Expression error: Unrecognised punctuation character "{". }} }} || }} }}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting1720
4{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| 64641343521812
}}{{
- vardefine: generic-inventory
| 521812
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
|
4{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
4
}}{{
- vardefine: smithing-table-attribute
| 4
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
| 1720
4{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
|
}}
Furnace
{{Inventory
|type=furnace
|lit=true
|0=Damaged Wooden Axe
|1=Damaged Stone Pickaxe
|12=Granite,24
|Fuel=Stripped Dark Oak Log,14
|Input=Raw Salmon,8
|Output=Cooked Salmon,56}}
- Result
{{
- vardefine: inventory-title
|
| {{#vardefineecho: string |
{{#explode: furnace | - | {{#var: index}}}}
}}
| Expression error: Unrecognised punctuation character "{".{{#var: string}}{{#vardefine: index | Expression error: Unrecognised punctuation character "{". }} }} || }} }}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
56{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory24
}}{{
- vardefine: generic-inventory
|
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
| 8
14
56{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
56
}}{{
- vardefine: smithing-table-attribute
| 56
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
|
56{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
| 148
}}
Large chest
{{Inventory
|type=large-chest
|title=Treasure Chest
|1=Trident
|5=Glue,3
|6=Blue Torch,64
|C0=Bucket of Salmon
|C1=Kelp,5
|C2=Gold Ingot,6
|C4=Diamond Shovel
|C5=Emerald,3
|C15=Block of Iron,64
|C21=Oak Wood,16
}}
- Result
{{
- vardefine: inventory-title
|
}}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory364
}}{{
- vardefine: generic-inventory
| 364
}}{{
- vardefine: chest-inventory
| 5636416
}}{{
- vardefine: furnace-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
}}{{
- vardefine: smithing-table-attribute
|
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
| 56
{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
|
}}
Crafting table
{{Inventory
|type=crafting-table
|recipebook=Portfolio
|A1= |B1=Blaze Powder |C1=
|A2= |B2=Coal,Charcoal |C2=
|A3= |B3=Gunpowder |C3=
|Output=Fire Charge,3
}}
- Result
{{
- vardefine: inventory-title
|
}}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
3{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory
}}{{
- vardefine: generic-inventory
|
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
|
3{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
3
}}{{
- vardefine: smithing-table-attribute
| 3
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
|
3{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
|
}}
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
{{
- vardefine: inventory-title
|
}}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory646413435212
}}{{
- vardefine: generic-inventory
| 5212
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
| Enchanted Book
}}{{
- vardefine: smithing-table-attribute
| Enchanted Book
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
|
}}
Smithing Table
{{Inventory
|type=smithing-table
|Input1=Diamond Sword
|Input2=Netherite Ingot
|Output=Netherite Sword
|crossed=true
}}
- Result
{{
- vardefine: inventory-title
|
}}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory
}}{{
- vardefine: generic-inventory
|
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
}}{{
- vardefine: smithing-table-attribute
|
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
|
}}
Dispenser
{{Inventory
|type=dispenser
|D0=Arrow,64
|D1=Firework Rocket,64
|D2=Trident
|D3=Fire Charge,64
|D4=TNT,64
|D5=Ice Bomb,16
|D7=TNT,3
}}
- Result
{{
- vardefine: inventory-title
|
| {{#vardefineecho: string |
{{#explode: dispenser | - | {{#var: index}}}}
}}
| Expression error: Unrecognised punctuation character "{".{{#var: string}}{{#vardefine: index | Expression error: Unrecognised punctuation character "{". }} }} || }} }}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory
}}{{
- vardefine: generic-inventory
|
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
}}{{
- vardefine: smithing-table-attribute
|
}}{{
- vardefine: dispenser-inventory
| 64646464163
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
|
}}
Hopper
{{Inventory
|type=hopper
|H0=Diamond,2
|H1=Wooden Shovel
|H2=Wooden Shovel
|H3=Wooden Shovel
|H4=Wooden Shovel
|0=Dirt,2
}}
- Result
{{
- vardefine: inventory-title
|
}}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory2
}}{{
- vardefine: generic-inventory
| 2
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
}}{{
- vardefine: smithing-table-attribute
|
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
| 2
}}{{
- vardefine: crafting-table-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
|
}}
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
{{
- vardefine: inventory-title
|
}}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory
}}{{
- vardefine: generic-inventory
|
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
|
13
{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
}}{{
- vardefine: smithing-table-attribute
|
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
| 13
}}
Generic
{{Inventory
|type=generic
|title=Small Box of Stuff
|rows=2
|0=Stick,4
|Oak Log
|Spruce Log
|11=Netherite Scrap
|16=Beetroot
|17=Carrot
}}
- Result
{{
- vardefine: inventory-title
|
}}{{
- vardefine: survival-armor
|
}}{{
- vardefine: recipe-book
|
}}{{
- vardefine: inventory-table
| Crafting
{{#var: recipe-book}}
}}{{
- vardefine: player-inventory
| Inventory4
}}{{
- vardefine: generic-inventory
| 4
}}{{
- vardefine: chest-inventory
|
}}{{
- vardefine: furnace-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: anvil-attribute
|
}}{{
- vardefine: smithing-table-attribute
|
}}{{
- vardefine: dispenser-inventory
|
}}{{
- vardefine: hopper-inventory
|
}}{{
- vardefine: crafting-table-attribute
|
{{#var: recipe-book}}
}}{{
- vardefine: brewing-stand-attribute
|
}}
See also
- {{Crafting Table}}
- {{Inventory Table}}
- {{Furnace}}
- {{Brewing Stand}}
- {{Stonecutter}}
- {{Loom}}
- {{Grindstone}}
- {{Hotbar}}
- {{Inventory}}
- {{Inventory slot}}
- Module:UI