Plantilla:Inventory slot

De Minecraft Wiki
Saltar a: navegación, buscar
[ver | editar | historia | depurar]Documentación
Lua logo.svg

Esta plantilla utiliza el Módulo:Inventory slot, con datos almacenados en Módulo:Inventory slot/Aliases.
Estos scripts están escritos en Lua.

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

The images used are primarily taken from {{InvSprite}}, but if the specified item is not found, the template falls back to individual images in the format of Grid <item name>.png. However, this should never happen, and any cases of it happening must be looked into.


Todas las entradas son opcionales:

|[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


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.

Ejemplo simple

Para mostrar un objeto de inventario de "Chuleta de cerdo cruda" con un tamaño de pila de 20 debe colocarse: {{Slot|Chuleta de cerdo cruda,20}}



Una cantidad de 2–999 es soportada, todo lo demás no se mostrará.


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.

{{Slot|Any Log;Manzana dorada}}


[[Oak Log|[[Spruce Log|[[Birch Log|[[Jungle Log|[[Acacia Log|[[Dark Oak Log|

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

{{Slot|Any Log,4;[&oManzana brillante]Manzana dorada encantada}}


[[Oak Log|4[[Spruce Log|4[[Birch Log|4[[Jungle Log|4[[Acacia Log|4[[Dark Oak Log|4

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.

{{Slot|Chuleta de cerdo cruda; Chuleta de cerdo cocinada|title=Chuleta de cerdito}}


To remove the title, set it to "none": {{Slot|Chuleta de cerdo cruda; Chuleta de cerdo cocinada|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 & instead of §. If the title only contains formatting codes and no actual text, the formatting will be added to the normal title.

{{Slot|[&b]Espada de diamante}}


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 (/).

{{Slot|[&b&oExcálibur]Espada de hierro[&7Golpeo V/Aspecto ígneo I//&9+6 Daño de ataque]}}



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:

{{Slot|{Any Planks};Lingote de hierro}}


[[Oak Planks|[[Spruce Planks|[[Birch Planks|[[Jungle Planks|[[Acacia Planks|[[Dark Oak Planks|[[Crimson Planks|[[Warped Planks|


Align uses the vertical-align CSS property. For example to align to the middle: Smells like {{Slot|Chuleta de cerdo cruda|align=middle}} in here!


Smells like in here!


Default is always shown and is placed under the image. {{Slot|default=Grid layout Brewing Empty}}{{Slot|Poción vulgar arrojadiza|default=Grid layout Brewing Empty}}



To change the link for all frames from the image name put: {{Slot|Carbón vegetal|link=Carbón#Carbón vegetal}}


To remove the link, set link to none: {{Slot|Carbón vegetal|link=none}}


Note that this retains the title.


A mod image is specified with the Mod: section of the name (or by setting a default mod using the mod parameter). The image link will then link to the mod sub-page allowing correct linking of mod images. The uploaded image name should by uploaded as Grid <Name> (<Mod>).png and should be added to the Grid mods category, which prevents them from being confused with official Minecraft items.
This usage is not recommended, however, as all mod pages are being migrated to the FTB wiki.

Available images

In general, an item can be referred to by its tooltip name.

For dyes, dyed items and wood, there are two shortcuts to refer to all colors or tree species. Use e.g. "Any Wood Planks" if the item appears in more than one input slot and doesn't have to be the same color in all slots. Different copies of the same "Any [item]" will switch randomly and separately among the variants. Otherwise, use "Matching [item]"; all slots containing a "Matching" item will cycle through the species or dye colors in unison, even if they're not the same item.

{{Slot|Any Planks}}{{Slot|Any wood Slab}}{{Slot|Any wood Stairs}}

{{Slot|Matching Wood Planks}}{{Slot|Matching Wood Slab}}{{Slot|Matching wood Stairs}}


[[Oak Planks|[[Spruce Planks|[[Birch Planks|[[Jungle Planks|[[Acacia Planks|[[Dark Oak Planks|[[Crimson Planks|[[Warped Planks|[[Oak Slab|[[Spruce Slab|[[Birch Slab|[[Jungle Slab|[[Acacia Slab|[[Dark Oak Slab|[[Crimson Slab|[[Warped Slab|[[Oak Stairs|[[Spruce Stairs|[[Birch Stairs|[[Jungle Stairs|[[Acacia Stairs|[[Dark Oak Stairs|[[Crimson Stairs|[[Warped Stairs|

[[Oak Wood Planks|[[Spruce Wood Planks|[[Birch Wood Planks|[[Jungle Wood Planks|[[Acacia Wood Planks|[[Dark Oak Wood Planks|[[Oak Wood Slab|[[Spruce Wood Slab|[[Birch Wood Slab|[[Jungle Wood Slab|[[Acacia Wood Slab|[[Dark Oak Wood Slab|[[Oak Stairs|[[Spruce Stairs|[[Birch Stairs|[[Jungle Stairs|[[Acacia Stairs|[[Dark Oak Stairs|[[Crimson Stairs|[[Warped Stairs|

Most items with a durability bar exist as "Damaged [item]".

See Template:InvSprite for the full list of items.

Other templates

These templates implement this template into a GUI screen which mimics how it would look in Minecraft. Thus, they have mostly the same features as this template. Plantilla:UI see also

[ver | editar | historia | depurar]La documentación arriba es transcluída desde Plantilla:Inventory slot/doc.