Template:Inventory

From CivWiki
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

Note: this module should only be used if you want to show an Inventory, or a recipe in an open container. If you only want to show a recipe, use its respective template, e.g. {{Furnace}}

General Usage

Type

This is a required parameter. It specifies what type of container to simulate. There are 11 different values this property can have, as detailed below. Click on a container type to learn more about it.

survivalgeneric
chestlarge-chestfurnaceanvilsmithing-tabledispenserhoppercrafting-tablebrewing-stand

Other Parameters

  • title | Title that should show on the container
  • inventory | Whether to show the player's inventory
  • scale | Size multiplier of the resulting element (doesn't work on firefox or Android)

Slot IDs

  • [Slot ID] | The item that should be rendered in the specified slot.
  • 0 - 8: the hotbar slots from left to right
  • 9 - 35: the slots in the rest of the inventory from left to right, top to bottom
  • Some containers have their own Slot IDs, check their documentation above

Example: Configuring a container as below:

{{Inventory
| type=survival
| 0=Diamond Sword
}}

Will show a diamond sword in the first slot of the hotbar


Crafting
Invicon Recipe Book.png: Sprite image for Recipe Book in MinecraftInvicon Diamond Sword.png: Inventory sprite for Diamond Sword in Minecraft as shown in-game linking to with description: Diamond Sword When in main hand:  1.6 Attack Speed  7 Attack Damage


Container Specifics

Survival

The survival type configuration displays an inventory in survival mode

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.

Generic

The generic type configuration displays a generic container.

Parameters
Parameter Function Default value
rows The number of rows to show (max is 16). 1
0 – 143 Available item slots.

Chest

The chest type configuration displays a chest GUI.

On a normal chest, slots 0 - 26 are available
On a large chest, 27 - 53 are also available

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
recipebook Recipebook button item Recipe Book

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

The smithing-table type configuration displays a 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

Dispenser

The dispenser type configuration displays an opened dispenser's GUI.

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

Hopper

The hopper type configuration displays an opened hopper's GUI.

Parameters
Parameter Function Default value
H0 – H4 Hopper item slots

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
recipebook Recipebook button item Recipe Book

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