Ez a sablon az alábbi modult használja: Modul:Inventory slot, , melynek az adatai itt vannak tárolva: Modul:Inventory slot/Aliases. Ezek a szkriptek Luában vannak írva. Lásd: hu.wp:Lua és mw:Extension:Scribunto! |
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
.
Usage[]
All inputs are optional:
{{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 }}
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 "Raw Porkchop" with an stack size of 20 you would put: {{Slot|Raw Porkchop,20}}
- shows
20
An amount of 2–999 is supported, anything else will not be displayed.
Aliases[]
Alias | Output |
---|---|
11 Disc |
|
13 Disc |
Music Disc |
Any Balloon Matching Balloon |
|
Any Banner Matching Banner |
|
Any Bark Matching Bark |
Oak BarkSpruce BarkBirch BarkJungle BarkAcacia BarkDark Oak Bark |
Any Bed Matching Bed |
|
Any Boat Matching Boat |
|
Any Carpet Matching Carpet |
|
Any Colored Dye Matching Colored Dye |
|
Any Concrete Matching Concrete |
|
Any Concrete Powder Matching Concrete Powder |
|
Any Dye Matching Dye |
|
Any Dyed Bed Matching Dyed Bed |
|
Any Dyed Carpet Matching Dyed Carpet |
|
Any Dyed Terracotta Matching Dyed Terracotta |
|
Any Dyed Wool Matching Dyed Wool |
|
Any Fence Gate Matching Fence Gate |
|
Any Firework Star Matching Firework Star |
|
Any Glazed Terracotta Matching Glazed Terracotta |
|
Any Hardened Stained Glass Matching Hardened Stained Glass |
|
Any Hardened Stained Glass Pane Matching Hardened Stained Glass Pane |
|
Any Lingering Potion Matching Lingering Potion |
|
Any Log Matching Log |
|
Any Mushroom Matching Mushroom |
|
Any Planks Matching Planks |
|
Any Potion Matching Potion |
|
Any Purpur Block Matching Purpur Block |
|
Any Quartz Block Matching Quartz Block |
|
Any Red Sandstone Matching Red Sandstone |
|
Any Sandstone Matching Sandstone |
|
Any Shield Matching Shield |
|
Any Shulker Box Matching Shulker Box |
|
Any Splash Potion Matching Splash Potion |
|
Any Stained Glass Matching Stained Glass |
|
Any Stained Glass Pane Matching Stained Glass Pane |
|
Any Stone Matching Stone |
|
Any Stone Bricks Matching Stone Bricks |
|
Any Stone Slab Matching Stone Slab |
|
Any Stripped Bark Matching Stripped Bark |
Stripped Oak BarkStripped Spruce BarkStripped Birch BarkStripped Jungle BarkStripped Acacia BarkStripped Dark Oak Bark |
Any Stripped Log Matching Stripped Log |
|
Any Stripped Wood Matching Stripped Wood |
|
Any Tipped Arrow Matching Tipped Arrow |
|
Any Wood Matching Wood |
|
Any Wood Planks Matching Wood Planks |
|
Any Wood Slab Matching Wood Slab |
|
Any Wood Stairs Matching Wood Stairs |
|
Any Wool Matching Wool |
|
Any axe Matching axe |
|
Any chain armor Matching chain armor |
Chain HelmetChain ChestplateChain LeggingsChain Boots |
Any diamond armor Matching diamond armor |
|
Any diamond tools Matching diamond tools |
|
Any fuel Matching fuel |
|
Any golden armor Matching golden armor |
|
Any golden tools Matching golden tools |
|
Any hoe Matching hoe |
|
Any iron armor Matching iron armor |
|
Any iron tools Matching iron tools |
|
Any leather armor Matching leather armor |
|
Any pickaxe Matching pickaxe |
|
Any shovel Matching shovel |
|
Any stone tools Matching stone tools |
|
Any sword Matching sword |
|
Any wood Button Matching wood Button |
|
Any wood Door Matching wood Door |
|
Any wood Fence Matching wood Fence |
|
Any wood Pressure Plate Matching wood Pressure Plate |
|
Any wood Slab Matching wood Slab |
|
Any wood Stairs Matching wood Stairs |
|
Any wood Trapdoor Matching wood Trapdoor |
|
Any wooden tools Matching wooden tools |
|
Applicable Dye |
|
Arrow of Decay |
|
Arrow of Decay Enhanced |
|
Arrow of Decay Extended |
|
Arrow of Fire Resistance |
|
Arrow of Fire Resistance Enhanced |
|
Arrow of Fire Resistance Extended |
|
Arrow of Harming |
|
Arrow of Harming Enhanced |
|
Arrow of Healing |
|
Arrow of Healing Enhanced |
|
Arrow of Invisibility |
|
Arrow of Invisibility Enhanced |
|
Arrow of Invisibility Extended |
|
Arrow of Leaping |
|
Arrow of Leaping Enhanced |
|
Arrow of Leaping Extended |
|
Arrow of Luck |
|
Arrow of Luck Enhanced |
|
Arrow of Luck Extended |
|
Arrow of Night Vision |
|
Arrow of Night Vision Enhanced |
|
Arrow of Night Vision Extended |
|
Arrow of Poison |
|
Arrow of Poison Enhanced |
|
Arrow of Poison Extended |
|
Arrow of Regeneration |
|
Arrow of Regeneration Enhanced |
|
Arrow of Regeneration Extended |
|
Arrow of Slow Falling |
|
Arrow of Slow Falling Enhanced |
|
Arrow of Slow Falling Extended |
|
Arrow of Slowness |
|
Arrow of Slowness Enhanced |
|
Arrow of Slowness Extended |
|
Arrow of Splashing |
|
Arrow of Strength |
|
Arrow of Strength Enhanced |
|
Arrow of Strength Extended |
|
Arrow of Swiftness |
|
Arrow of Swiftness Enhanced |
|
Arrow of Swiftness Extended |
|
Arrow of Water Breathing |
|
Arrow of Water Breathing Enhanced |
|
Arrow of Water Breathing Extended |
|
Arrow of Weakness |
|
Arrow of Weakness Enhanced |
|
Arrow of Weakness Extended |
|
Arrow of the Turtle Master |
|
Arrow of the Turtle Master Enhanced |
Arrow Potion of the Turtle Master |
Arrow of the Turtle Master Extended |
|
Awkward Lingering Potion |
|
Awkward Potion |
|
Awkward Splash Potion |
|
Beacon |
|
Black Firework Star |
|
Blue Firework Star |
|
Bottle o' Enchanting |
|
Broken Elytra |
|
Brown Firework Star |
|
Button |
|
Chain Command Block |
Chain Command Block |
Chloride |
|
Clay (block) |
|
Command Block |
Command Block |
Conduit |
|
Cooked Beef |
|
Creeper Head |
|
Cyan Firework Star |
|
Damaged Bow |
|
Damaged Carrot on a Stick |
|
Damaged Chain Boots |
Chain Boots |
Damaged Chain Chestplate |
Chain Chestplate |
Damaged Chain Helmet |
Chain Helmet |
Damaged Chain Leggings |
Chain Leggings |
Damaged Diamond Axe |
|
Damaged Diamond Boots |
|
Damaged Diamond Chestplate |
|
Damaged Diamond Helmet |
|
Damaged Diamond Hoe |
|
Damaged Diamond Leggings |
|
Damaged Diamond Pickaxe |
|
Damaged Diamond Shovel |
|
Damaged Diamond Sword |
|
Damaged Elytra |
|
Damaged Fishing Rod |
|
Damaged Flint and Steel |
|
Damaged Golden Axe |
|
Damaged Golden Boots |
|
Damaged Golden Chestplate |
|
Damaged Golden Helmet |
|
Damaged Golden Hoe |
|
Damaged Golden Leggings |
|
Damaged Golden Pickaxe |
|
Damaged Golden Shovel |
|
Damaged Golden Sword |
|
Damaged Iron Axe |
|
Damaged Iron Boots |
|
Damaged Iron Chestplate |
|
Damaged Iron Helmet |
|
Damaged Iron Hoe |
|
Damaged Iron Leggings |
|
Damaged Iron Pickaxe |
|
Damaged Iron Shovel |
|
Damaged Iron Sword |
|
Damaged Leather Boots |
|
Damaged Leather Cap |
|
Damaged Leather Pants |
|
Damaged Leather Tunic |
|
Damaged Shears |
|
Damaged Shield |
|
Damaged Stone Axe |
|
Damaged Stone Hoe |
|
Damaged Stone Pickaxe |
|
Damaged Stone Shovel |
|
Damaged Stone Sword |
|
Damaged Wooden Axe |
|
Damaged Wooden Hoe |
|
Damaged Wooden Pickaxe |
|
Damaged Wooden Shovel |
|
Damaged Wooden Sword |
|
Diamond Axe |
|
Diamond Hoe |
|
Diamond Pickaxe |
|
Diamond Shovel |
|
Diamond Sword |
|
Dragon Egg |
|
Dragon Head |
|
Dragon's Breath |
|
Elytra |
|
Elytra Wings |
|
Enchanted Book |
|
Enchanted Golden Apple |
|
End Crystal |
|
Fire |
Fire |
Golden Apple |
|
Golden Axe |
|
Golden Hoe |
|
Golden Pickaxe |
|
Golden Shovel |
|
Golden Sword |
|
Gray Firework Star |
|
Green Firework Star |
|
Head |
|
Heart of the Sea |
|
Heat Block |
Heat Block |
Iron Axe |
|
Iron Hoe |
|
Iron Pickaxe |
|
Iron Shovel |
|
Iron Sword |
|
Lead (element) |
|
Light Blue Firework Star |
|
Light Gray Firework Star |
|
Lime Firework Star |
|
Lingering Potion of Decay |
|
Lingering Potion of Decay Enhanced |
|
Lingering Potion of Decay Extended |
|
Lingering Potion of Fire Resistance |
|
Lingering Potion of Fire Resistance Enhanced |
|
Lingering Potion of Fire Resistance Extended |
|
Lingering Potion of Harming |
|
Lingering Potion of Harming Enhanced |
|
Lingering Potion of Healing |
|
Lingering Potion of Healing Enhanced |
|
Lingering Potion of Invisibility |
|
Lingering Potion of Invisibility Enhanced |
|
Lingering Potion of Invisibility Extended |
|
Lingering Potion of Leaping |
|
Lingering Potion of Leaping Enhanced |
|
Lingering Potion of Leaping Extended |
|
Lingering Potion of Luck |
|
Lingering Potion of Luck Enhanced |
|
Lingering Potion of Luck Extended |
|
Lingering Potion of Night Vision |
|
Lingering Potion of Night Vision Enhanced |
|
Lingering Potion of Night Vision Extended |
|
Lingering Potion of Poison |
|
Lingering Potion of Poison Enhanced |
|
Lingering Potion of Poison Extended |
|
Lingering Potion of Regeneration |
|
Lingering Potion of Regeneration Enhanced |
|
Lingering Potion of Regeneration Extended |
|
Lingering Potion of Slow Falling |
|
Lingering Potion of Slow Falling Enhanced |
|
Lingering Potion of Slow Falling Extended |
|
Lingering Potion of Slowness |
|
Lingering Potion of Slowness Enhanced |
|
Lingering Potion of Slowness Extended |
|
Lingering Potion of Strength |
|
Lingering Potion of Strength Enhanced |
|
Lingering Potion of Strength Extended |
|
Lingering Potion of Swiftness |
|
Lingering Potion of Swiftness Enhanced |
|
Lingering Potion of Swiftness Extended |
|
Lingering Potion of Water Breathing |
|
Lingering Potion of Water Breathing Enhanced |
|
Lingering Potion of Water Breathing Extended |
|
Lingering Potion of Weakness |
|
Lingering Potion of Weakness Enhanced |
|
Lingering Potion of Weakness Extended |
|
Lingering Potion of the Turtle Master |
|
Lingering Potion of the Turtle Master Enhanced |
|
Lingering Potion of the Turtle Master Extended |
|
Lingering Water Bottle |
|
Locator Map |
|
Magenta Firework Star |
|
Magma Block |
Magma Block |
Map (no markers) |
|
Mundane Lingering Potion |
|
Mundane Potion |
|
Mundane Splash Potion |
|
Nether Brick (item) |
Nether Brick |
Nether Star |
|
Orange Firework Star |
|
Pink Firework Star |
|
Potion of Decay |
|
Potion of Decay Enhanced |
|
Potion of Decay Extended |
|
Potion of Fire Resistance |
|
Potion of Fire Resistance Enhanced |
|
Potion of Fire Resistance Extended |
|
Potion of Harming |
|
Potion of Harming Enhanced |
|
Potion of Healing |
|
Potion of Healing Enhanced |
|
Potion of Invisibility |
|
Potion of Invisibility Enhanced |
|
Potion of Invisibility Extended |
|
Potion of Leaping |
|
Potion of Leaping Enhanced |
|
Potion of Leaping Extended |
|
Potion of Luck |
|
Potion of Luck Enhanced |
|
Potion of Luck Extended |
|
Potion of Night Vision |
|
Potion of Night Vision Enhanced |
|
Potion of Night Vision Extended |
|
Potion of Poison |
|
Potion of Poison Enhanced |
|
Potion of Poison Extended |
|
Potion of Regeneration |
|
Potion of Regeneration Enhanced |
|
Potion of Regeneration Extended |
|
Potion of Slow Falling |
|
Potion of Slow Falling Enhanced |
|
Potion of Slow Falling Extended |
|
Potion of Slowness |
|
Potion of Slowness Enhanced |
|
Potion of Slowness Extended |
|
Potion of Strength |
|
Potion of Strength Enhanced |
|
Potion of Strength Extended |
|
Potion of Swiftness |
|
Potion of Swiftness Enhanced |
|
Potion of Swiftness Extended |
|
Potion of Water Breathing |
|
Potion of Water Breathing Enhanced |
|
Potion of Water Breathing Extended |
|
Potion of Weakness |
|
Potion of Weakness Enhanced |
|
Potion of Weakness Extended |
|
Potion of the Turtle Master |
|
Potion of the Turtle Master Enhanced |
|
Potion of the Turtle Master Extended |
|
Prismarine |
Prismarine |
Purple Firework Star |
|
Red Firework Star |
|
Repeating Command Block |
Repeating Command Block |
Sea Lantern |
Sea Lantern |
Skeleton Skull |
|
Snow (layer) |
Snow |
Sparkler |
|
Splash Potion of Decay |
|
Splash Potion of Decay Enhanced |
|
Splash Potion of Decay Extended |
|
Splash Potion of Fire Resistance |
|
Splash Potion of Fire Resistance Enhanced |
|
Splash Potion of Fire Resistance Extended |
|
Splash Potion of Harming |
|
Splash Potion of Harming Enhanced |
|
Splash Potion of Healing |
|
Splash Potion of Healing Enhanced |
|
Splash Potion of Invisibility |
|
Splash Potion of Invisibility Enhanced |
|
Splash Potion of Invisibility Extended |
|
Splash Potion of Leaping |
|
Splash Potion of Leaping Enhanced |
|
Splash Potion of Leaping Extended |
|
Splash Potion of Luck |
|
Splash Potion of Luck Enhanced |
|
Splash Potion of Luck Extended |
|
Splash Potion of Night Vision |
|
Splash Potion of Night Vision Enhanced |
|
Splash Potion of Night Vision Extended |
|
Splash Potion of Poison |
|
Splash Potion of Poison Enhanced |
|
Splash Potion of Poison Extended |
|
Splash Potion of Regeneration |
|
Splash Potion of Regeneration Enhanced |
|
Splash Potion of Regeneration Extended |
|
Splash Potion of Slow Falling |
|
Splash Potion of Slow Falling Enhanced |
|
Splash Potion of Slow Falling Extended |
|
Splash Potion of Slowness |
|
Splash Potion of Slowness Enhanced |
|
Splash Potion of Slowness Extended |
|
Splash Potion of Strength |
|
Splash Potion of Strength Enhanced |
|
Splash Potion of Strength Extended |
|
Splash Potion of Swiftness |
|
Splash Potion of Swiftness Enhanced |
|
Splash Potion of Swiftness Extended |
|
Splash Potion of Water Breathing |
|
Splash Potion of Water Breathing Enhanced |
|
Splash Potion of Water Breathing Extended |
|
Splash Potion of Weakness |
|
Splash Potion of Weakness Enhanced |
|
Splash Potion of Weakness Extended |
|
Splash Potion of the Turtle Master |
|
Splash Potion of the Turtle Master Enhanced |
|
Splash Potion of the Turtle Master Extended |
|
Splash Water Bottle |
|
Stone Axe |
|
Stone Hoe |
|
Stone Pickaxe |
|
Stone Shovel |
|
Stone Sword |
|
Structure Block |
|
Thick Lingering Potion |
|
Thick Potion |
|
Thick Splash Potion |
|
Tipped Arrow |
|
Totem of Undying |
|
Trident |
|
Uncraftable Lingering Potion |
|
Uncraftable Potion |
|
Uncraftable Splash Potion |
|
Uncraftable Tipped Arrow |
|
Water (compound) |
|
Water Bottle |
|
White Firework Star |
|
Wither Skeleton Skull |
|
Wooden Axe |
|
Wooden Button |
|
Wooden Hoe |
|
Wooden Pickaxe |
|
Wooden Shovel |
|
Wooden Sword |
|
Yellow Firework Star |
|
Zombie Head |
|
blocks Disc |
Music Disc |
cat Disc |
Music Disc |
chirp Disc |
Music Disc |
far Disc |
Music Disc |
mall Disc |
Music Disc |
mellohi Disc |
Music Disc |
stal Disc |
Music Disc |
strad Disc |
Music Disc |
wait Disc |
Music Disc |
ward Disc |
Music Disc |
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 Wood;Golden Apple}}
- shows
When using the alias, parts can be added which will override any parts in the alias.
{{Slot|Any Wood,4;[&oShiny Apple]Enchanted Golden Apple}}
- shows
444444
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|Raw Porkchop; Cooked Porkchop|title=Smelly Porkchop}}
- shows
To remove the title, set it to "none": {{Slot|Raw Porkchop; Cooked Porkchop|title=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.
{{Slot|[&b]Diamond Sword}}
- 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 (/).
{{Slot|[&b&oExcalibur]Iron Sword[&7Smite V/Fire Aspect I//&9+6 Attack Damage]}}
- 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:
{{Slot|{Any Wood Planks};Iron Ingot}}
- shows
Align[]
Align uses the vertical-align CSS property. For example to align to the middle:
Smells like {{Slot|Raw Porkchop|align=middle}} in here!
- shows
Smells like in here!
Default[]
Default is always shown and is placed under the image. {{Slot|default=Grid layout Brewing Empty}}
{{Slot|Splash Mundane Potion|default=Grid layout Brewing Empty}}
- shows
Link[]
To change the link for all frames from the image name put: {{Slot|Charcoal|link=Coal#Charcoal}}
- shows
To remove the link, set link to none: {{Slot|Charcoal|link=none}}
- shows
Note that this retains the title.
Mods[]
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 Inventory slot mods category, which prevents them from being confused with official Minecraft items.
For example, to display this mod image File:Grid Bronze Sword (IndustrialCraft).png: {{Slot|IndustrialCraft:Bronze Sword}}
(or {{Slot|mod=IndustrialCraft|Bronze Sword}}
)
- shows
Slots can be animated with a theoretically unlimited amount of frames, between mod items and vanilla items. Frames are separated by semi-colons (;).
{{Slot| Dirt; TNT,64; IndustrialCraft:Bronze Sword,6; ; Grass Block,5; Sand; Gold Helmet,12; IndustrialCraft:Bronze Helmet,2; IndustrialCraft:Copper,50; Redstone }}
- shows
646
5Gold Helmet12250
As you can see, the mod had to be specified for each mod frame, this is where the default mod parameter is useful.
{{Slot|mod=IndustrialCraft|Bronze Sword,6; ; Bronze Helmet,12; Copper,50; Copper Dust}}
- shows
To use a vanilla minecraft item when a default mod is set, use "vanilla" (shortcut "v") or "minecraft" (shortcut "mc") as the mod (case insensitive).
{{Slot|mod=IndustrialCraft| Vanilla:Dirt; vanilla:TNT,64; Bronze Sword,6; ; V:Grass Block,5; v:Sand; Minecraft:Gold Helmet,12; Bronze Helmet,2; Copper,50; mc:Redstone Dust }}
- shows
646
5Gold Helmet12250
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 Wood Planks}}{{Slot|Any Wood Slab}}{{Slot|Any Wood Stairs}} {{Slot|Matching Wood Planks}}{{Slot|Matching Wood Slab}}{{Slot|Matching Wood Stairs}}
shows
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.
{{Crafting Table}}
{{Inventory Table}}
{{Furnace}}
{{Brewing Stand}}
{{Hotbar}}
{{Inventory slot}}
- Module:UI