Template:Inventory

From Tensura Wiki
Jump to navigation Jump to search


File:Template-info.svg Documentation Edit this documentation at Template:Inventory/doc.
(edit • history • purge)

Template:Documentation header

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

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:Code 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
player The image of the player avatar preview area, must be 98 × 140 pixels Note: this currently isn't working Steve inventory.png
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:Code 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:Code 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
recipebook Recipebook button item Recipe Book

Brewing Stand

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

Current

The Template:Code type configuration will display the current smithing table GUI when it is finished.

Examples

Survival inventory

{{Inventory
|type=survival
|1=Silver Ingot, 20
|2=Diamond Axe
|3=Diamond Pickaxe
|4=Obsidian, 40
|36=Low Magisteel Ingot,43
|A1=Charcoal,17
|A2=Stick,20
|Output=Torch,4
|103=Silver Helmet
|102=Silver Chestplate
|101=Silver Leggings
|100=Silver Boots
}}
Result
Silver HelmetSilver ChestplateSilver LeggingsSilver Boots
CraftingCharcoal17Stick20
Torch4
Low Magisteel Ingot43Silver Ingot20Diamond AxeDiamond PickaxeObsidian40


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
CraftingBlaze PowderCoalGunpowder
Fire Charge3InventoryObsidian99


Furnace

{{Inventory
|type=furnace
|lit=true
|1=Damaged Wooden Axe
|2=Damaged Stone Pickaxe
|13=Granite,24
|Fuel=Coal,14
|Input=Raw Salmon,8
|Output=Cooked Salmon,56}}
Result
FurnaceRaw Salmon8
Coal14
Cooked Salmon56
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


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 & Name
Iron PickaxeDiamond PickaxeNetherite Pickaxe


Enchantment Cost: 28InventoryDiamond AxeDiamond Pickaxe


Smithing Table

Legacy

{{Inventory
|type=legacy-smithing
|Input1=Diamond Pickaxe
|Input2=Netherite Ingot
|Output=Netherite Pickaxe
|crossed=true
}}
Result
Upgrade GearDiamond PickaxeNetherite IngotNetherite Pickaxe


Inventory


Current

{{Inventory
|type=smithing
|Input1=Netherite Upgrade Smithing Template
|Input2=Diamond Sword
|Input3=Netherite Ingot
|Output=Netherite Sword
|crossed=true
}}
Result


See also