Toggle search
Search
Toggle menu
Notifications
Toggle personal menu
Editing
Template:Inventory slot/doc
(section)
Template page
Views
Read
Edit
View history
associated-pages
Template
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == All inputs are optional:<br> <pre>{{Slot |[Title]Mod:Name,Amount[Description]; [Title2]Mod2:Name2,Amount2[Description2]; ... |mod=Default mod (useful for animations and layout templates) |default=Image always shown under the main image |align=Vertical Alignment |link=Link override |title=Text show on mouseover |class=Adds additional classes to the .invslot class |style=Adds styling to the .invslot |imgclass=Adds additional classes to the .invslot-item |numstyle=Adds styling to the stack number }}</pre> === Parts === The first parameter is a special parameter consisting of various "parts" grouped together in frames (delimited by <code>;</code>) which will be display one after another if JavaScript is enabled. Every part is optional, but without "name", won't do anything. The "name" can also include the image's extension following a dot (<code>.png</code> or <code>.gif</code>). ==== Simple example ==== To display an inventory item of "Raw Porkchop" with an stack size of 20 you would put: {{t|Slot|Raw Porkchop,20}} ;shows {{Slot|Raw Porkchop,20}} An amount of 2–999 is supported, anything else will not be displayed. === Aliases === {{#invoke: Inventory slot/Aliases/Table | table }} Note: Banner variations are not included due to how many there are. The above aliases can be used to shorten common items, such as all wood blocks or adding parts to certain names by default. {{t|Slot|Any Log;Golden Apple}} ;shows {{Slot|Any Log;Golden Apple}} When using the alias, parts can be added which will override any parts in the alias. {{t|Slot|Any Log,4;[&oShiny Apple]Enchanted Golden Apple}} ;shows {{Slot|Any Log,4;[&oShiny Apple]Enchanted Golden Apple}} Mods can specify an additional aliases table using the modaliases parameter. === Titles and description === The title parameter can be used to set a title for all frames. {{t|Slot|Raw Porkchop; Cooked Porkchop|title{{=}}Smelly Porkchop}} ;shows {{Slot|Raw Porkchop; Cooked Porkchop|title=Smelly Porkchop}} To remove the title, set it to "none": {{t|Slot|Raw Porkchop; Cooked Porkchop|title{{=}}none}} ;shows {{Slot|Raw Porkchop; Cooked Porkchop|title=none}} However, the first bracketed text can be used to specify a title for each frame individually, and also supports standard [[formatting codes]] using <code>&</code> instead of <code>§</code>. If the title only contains formatting codes and no actual text, the formatting will be added to the normal title. {{t|Slot|[&b]Diamond Sword}} ;shows {{Slot|[&b]Diamond Sword}} 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 (/). {{t|Slot|[&b&oExcalibur]Iron Sword[&7Smite V/Fire Aspect I//&9+6 Attack Damage]}} ;shows {{Slot|[&b&oExcalibur]Iron Sword[&7Smite V/Fire Aspect I//&9+6 Attack Damage]}} === 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: {{t|Slot|{Any Planks};Iron Ingot}} ;shows {{Slot|{Any Planks};Iron Ingot}} === Align === Align uses the [http://www.w3.org/wiki/CSS/Properties/vertical-align vertical-align] CSS property. For example to align to the middle: <code><nowiki>Smells like {{Slot|Raw Porkchop|align=middle}} in here!</nowiki></code> ;shows Smells like {{Slot|Raw Porkchop|align=middle}} in here! === Default === Default is always shown and is placed under the image. {{t|Slot|default{{=}}Brewing}}{{t|Slot|Mundane Splash Potion|default{{=}}Brewing}} ;shows {{Slot|default=Brewing}}{{Slot|Mundane Splash Potion|default=Brewing}} === Link === To change the link for all frames from the image name put: {{t|Slot|Charcoal|link{{=}}Coal#Charcoal}} ;shows {{Slot|Charcoal|link=Coal#Charcoal}} To remove the link, set link to none: {{t|Slot|Charcoal|link{{=}}none}} ;shows {{Slot|Charcoal|link=none}} Note that this retains the title.
Summary:
Please note that all contributions to WoopMC may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WoopMC:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)