Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

Template:Documentation header Template:Lua 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. Template:Tl

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 Template:Cd 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.

Template:Cd Template:Cd Template:Cd Template:Cd Template:Cd Template:Cd

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 Template:Cd 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 Template:Cd 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 Template:Cd 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 Template:Cd 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 Template:Cd 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 Template:Cd 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

Template:Inventory

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

Template:Inventory

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

Template:Inventory

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

Template: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

Template:Inventory

Smithing Table

Legacy

{{Inventory
|type=legacy-smithing
|Input1=Diamond Sword
|Input2=Netherite Ingot
|Output=Netherite Sword
|crossed=true
}}
Result

Template:Inventory

See also

Template:UI see also

zh:Template:Inventory
The above text is transcluded from Template:MC/Inventory/doc; you can change it or view its history.
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:MC/Inventory/doc. (View all subpages of this page.)