Template:Sugar Inventory slot/doc

The inventory slot template creates an interface element which looks and acts like an in-game inventory slot.

Definition
All inputs are optional:

Parent Function
The parent function consists of various different strings, all of which are optional. The parent function is shown below.

[%s]%s:%s,%s[%s]


 * In the first set of brackets goes the custom title for the tooltip (supports standard Minecraft formatting codes.)


 * The second string is for the mod that the item exists in (not really used a lot.)


 * The third string is the most crucial one as it is the image to be displayed in the slot. The image name will be used as the title if the "title" string is not specified.


 * The fourth string specifies the amount of the item. This only works when under the following interval: 2≤%s≤999.


 * In the last set of brackets goes the custom text that will be displayed under the title in the tooltip (also supports standard Minecraft formatting codes.)

Parts
The first parameter is a special parameter consisting of various "parts" grouped together in frames (delimited by ) which will be display one after another if JavaScript is enabled. Every part is optional, but without "name", won't do anything.

Simple example
To display an inventory item of "Lollipop" with an stack size of 20 you would put:
 * shows

An amount of 2–999 is supported, anything else will not be displayed.

Aliases

 * shows

When using the alias, parts can be added which will override any parts in the alias.


 * shows

Titles and description
The title parameter can be used to set a title for all frames.


 * shows

To remove the title, set it to "none":
 * shows

However, the first bracketed text can be used to specify a title for each frame individually, and also supports standard formatting codes using  instead of. If the title only contains formatting codes and no actual text, the formatting will be added to the normal title.


 * shows

The last bracketed text can be used to specify a description, this also supports standard formatting codes, and can also have multiple lines by using forward slashes (/).


 * shows

Subframes
Subframes are shown as a single frame, but the frames within it are advanced every time the subframe is displayed. A set of frames can be put in a subframe by wrapping it in braces.

Here, an alias (which resolves to multiple frames) is wrapped in a subframe, and a different wood plank variant is shown each animation cycle:


 * shows

Align
Align uses the vertical-align CSS property. For example to align to the middle: Chewy, just like !
 * shows

Link
To change the link for all frames from the image name put:
 * shows

To remove the link, set link to none:
 * shows

Note that this retains the title.

Colour Formatting Codes
Custom made (CandyCraft wiki exclusive only:)

Main Usage
This template is mainly used in the sugar furnace templates such as Sugar Furnace and Sugar Smelting.

Furnace
Sugar Furnace