Template:Inventory/doc

From Modded Wiki
Jump to navigation Jump to search
This is the documentation page. It should be transcluded into Template:Inventory. See Template:Documentation for more information.
This template uses Module:Inventory, a script written in 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. {{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.

survival crafting-table furnace brewing-stand anvil legacy-smithing

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
Invicon Diamond Helmet.png: Inventory sprite for Diamond Helmet in Minecraft as shown in-game linking to Minecraft:Diamond Helmet with description: Diamond Helmet When on Head: +3 Armor +2 Armor ToughnessInvicon Broken Elytra.png: Inventory sprite for Broken Elytra in Minecraft as shown in-game linking to Minecraft:Broken Elytra with description: ElytraInvicon Diamond Leggings.png: Inventory sprite for Diamond Leggings in Minecraft as shown in-game linking to Minecraft:Diamond Leggings with description: Diamond Leggings When on Legs: +6 Armor +2 Armor ToughnessInvicon Diamond Boots.png: Inventory sprite for Diamond Boots in Minecraft as shown in-game linking to Minecraft:Diamond Boots with description: Diamond Boots When on Feet: +3 Armor +2 Armor Toughness
Invicon Totem of Undying.png: Inventory sprite for Totem of Undying in Minecraft as shown in-game linking to Minecraft:Totem of Undying with description:CraftingInvicon Charcoal.png: Inventory sprite for Charcoal in Minecraft as shown in-game linking to Minecraft:Charcoal with description: Charcoal17Invicon Stick.png: Inventory sprite for Stick in Minecraft as shown in-game linking to Minecraft:Stick with description: Stick20
Invicon Torch.png: Inventory sprite for Torch in Minecraft as shown in-game linking to Minecraft:Torch with description: Torch4
Invicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Minecraft:Cobblestone with description: Cobblestone64Invicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Minecraft:Cobblestone with description: Cobblestone64Invicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Minecraft:Cobblestone with description: Cobblestone13Invicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to Minecraft:Diamond with description: Diamond43Invicon Diamond Sword.png: Inventory sprite for Diamond Sword in Minecraft as shown in-game linking to Minecraft:Diamond Sword with description: Mystical Sword Sharpness III Looting III Unbreaking VII Mending +9 Attack DamageInvicon Diamond Axe.png: Inventory sprite for Diamond Axe in Minecraft as shown in-game linking to Minecraft:Diamond Axe with description: Diamond Axe When in Main Hand:  9 Attack Damage  1 Attack SpeedInvicon Damaged Diamond Pickaxe.png: Inventory sprite for Damaged Diamond Pickaxe in Minecraft as shown in-game linking to Minecraft:Damaged Diamond Pickaxe with description: Diamond Pickaxe When in Main Hand:  5 Attack Damage  1.2 Attack SpeedInvicon Damaged Bow.png: Inventory sprite for Damaged Bow in Minecraft as shown in-game linking to Minecraft:Damaged Bow with description: BowInvicon Arrow.png: Inventory sprite for Arrow in Minecraft as shown in-game linking to Minecraft:Arrow with description: Arrow52Invicon Oak Wood Planks.png: Inventory sprite for Oak Wood Planks in Minecraft as shown in-game linking to Minecraft:Oak Wood Planks with description: Oak Wood Planks18Invicon Stick.png: Inventory sprite for Stick in Minecraft as shown in-game linking to Minecraft:Stick with description: Stick12


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
CraftingInvicon Blaze Powder.png: Inventory sprite for Blaze Powder in Minecraft as shown in-game linking to Minecraft:Blaze Powder with description: Blaze PowderInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to Minecraft:Coal with description: CoalInvicon Gunpowder.png: Inventory sprite for Gunpowder in Minecraft as shown in-game linking to Minecraft:Gunpowder with description: Gunpowder
Invicon Fire Charge.png: Inventory sprite for Fire Charge in Minecraft as shown in-game linking to Minecraft:Fire Charge with description: Fire Charge3InventoryInvicon Obsidian.png: Inventory sprite for Obsidian in Minecraft as shown in-game linking to Minecraft:Obsidian with description: Obsidian99


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
FurnaceInvicon Raw Salmon.png: Inventory sprite for Raw Salmon in Minecraft as shown in-game linking to Minecraft:Raw Salmon with description: Raw Salmon8
Invicon Stripped Dark Oak Log.png: Inventory sprite for Stripped Dark Oak Log in Minecraft as shown in-game linking to Minecraft:Stripped Dark Oak Log with description: Stripped Dark Oak Log14
Invicon Cooked Salmon.png: Inventory sprite for Cooked Salmon in Minecraft as shown in-game linking to Minecraft:Cooked Salmon with description: Cooked Salmon56
InventoryInvicon Granite.png: Inventory sprite for Granite in Minecraft as shown in-game linking to Minecraft:Granite with description: Granite24Invicon Damaged Wooden Axe.png: Inventory sprite for Damaged Wooden Axe in Minecraft as shown in-game linking to Minecraft:Damaged Wooden Axe with description: Wooden Axe When in Main Hand:  7 Attack Damage  0.8 Attack SpeedInvicon Damaged Stone Pickaxe.png: Inventory sprite for Damaged Stone Pickaxe in Minecraft as shown in-game linking to Minecraft:Damaged Stone Pickaxe with description: Stone Pickaxe When in Main Hand:  3 Attack Damage  1.2 Attack Speed


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
Magic StandInvicon Blaze Powder.png: Inventory sprite for Blaze Powder in Minecraft as shown in-game linking to Minecraft:Blaze Powder with description: Blaze Powder13Invicon Nether Wart.png: Inventory sprite for Nether Wart in Minecraft as shown in-game linking to Minecraft:Nether Wart with description: Nether WartInvicon Awkward Potion.png: Inventory sprite for Awkward Potion in Minecraft as shown in-game linking to Minecraft:Awkward Potion with description: Awkward Potion No EffectsInvicon Lingering Potion of Night Vision.png: Inventory sprite for Lingering Potion of Night Vision in Minecraft as shown in-game linking to Minecraft:Lingering Potion of Night Vision with description: Lingering Potion of Night Vision Night Vision (00:45)Invicon Antidote.png: Inventory sprite for Antidote in Minecraft as shown in-game linking to Minecraft:Antidote with description: Antidote





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
Repair & NameMystical SwordInvicon Diamond Sword.png: Inventory sprite for Diamond Sword in Minecraft as shown in-game linking to Minecraft:Diamond Sword with description: Unbreaking VII MendingInvicon Enchanted Book.png: Inventory sprite for Enchanted Book in Minecraft as shown in-game linking to Minecraft:Enchanted Book with description: Sharpness III Looting IIIInvicon Diamond Sword.png: Inventory sprite for Diamond Sword in Minecraft as shown in-game linking to Minecraft:Diamond Sword with description: Mystical Sword Sharpness III Looting III Unbreaking VII Mending +9 Attack Damage


Enchantment Cost: 28InventoryInvicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Minecraft:Cobblestone with description: Cobblestone64Invicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Minecraft:Cobblestone with description: Cobblestone64Invicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Minecraft:Cobblestone with description: Cobblestone13Invicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to Minecraft:Diamond with description: Diamond43Invicon Damaged Diamond Axe.png: Inventory sprite for Damaged Diamond Axe in Minecraft as shown in-game linking to Minecraft:Damaged Diamond Axe with description: Diamond Axe When in Main Hand:  9 Attack Damage  1 Attack SpeedInvicon Damaged Diamond Pickaxe.png: Inventory sprite for Damaged Diamond Pickaxe in Minecraft as shown in-game linking to Minecraft:Damaged Diamond Pickaxe with description: Diamond Pickaxe When in Main Hand:  5 Attack Damage  1.2 Attack SpeedInvicon Damaged Bow.png: Inventory sprite for Damaged Bow in Minecraft as shown in-game linking to Minecraft:Damaged Bow with description: BowInvicon Arrow.png: Inventory sprite for Arrow in Minecraft as shown in-game linking to Minecraft:Arrow with description: Arrow52Invicon Stick.png: Inventory sprite for Stick in Minecraft as shown in-game linking to Minecraft:Stick with description: Stick12


Smithing Table

Legacy

{{Inventory
|type=legacy-smithing
|Input1=Diamond Sword
|Input2=Netherite Ingot
|Output=Netherite Sword
|crossed=true
}}
Result
Upgrade GearInvicon Diamond Sword.png: Inventory sprite for Diamond Sword in Minecraft as shown in-game linking to Minecraft:Diamond Sword with description: Diamond Sword When in Main Hand:  7 Attack Damage  1.6 Attack SpeedInvicon Netherite Ingot.png: Inventory sprite for Netherite Ingot in Minecraft as shown in-game linking to Minecraft:Netherite Ingot with description: Netherite IngotInvicon Netherite Sword.png: Inventory sprite for Netherite Sword in Minecraft as shown in-game linking to Minecraft:Netherite Sword with description: Netherite Sword When in Main Hand:  8 Attack Damage  1.6 Attack Speed


Inventory


See also


zh:Template:Inventory/doc