Minecraft Wiki
Advertisement
ショートカット
Lua logo.svg
このテンプレートは、モジュール:Inventory slotと、モジュール:Inventory slot/Aliasesに格納されたデータを使用しています。
また、これらのスクリプトはLuaで書かれています。

このテンプレートはゲーム内のインベントリスロットと同様のものを表示するためのものです。 写真は主に{{InvSprite}}から取得されていますが指定されたアイテムが表示されない場合個々の画像にフォールバックします。

使用法

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

部品

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.

使用例

To display an inventory item of "Raw Porkchop" with an stack size of 20 you would put: {{Slot|Raw Porkchop,20}}

見本

20

2~999までがサポートされていてそれ以外は表示されません。

エイリアス

表示するものを指定するIDです。一覧はTemplate:InvSpriteにあります。

Titles and description

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

{{Slot|Raw Porkchop; Cooked Porkchop|title=Smelly Porkchop}}

見本


To remove the title, set it to "none": {{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 & 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}}

見本


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]}}

見本

サブフレーム

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};Iron Ingot}}

見本

整列

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 is always shown and is placed under the image. {{Slot|default=Grid layout Brewing Empty}}{{Slot|Splash Mundane Potion|default=Grid layout Brewing Empty}}

見本

リンク

To change the link for all frames from the image name put: {{Slot|Charcoal|link=Coal#Charcoal}}

見本


To remove the link, set link to none: {{Slot|Charcoal|link=none}}

見本

Note that this retains the title.

MOD

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.

利用可能な画像

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

見本

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

関連項目

[閲覧 | 編集 | 履歴 | キャッシュ破棄]上記の解説は、テンプレート:Inventory slot/docから参照されています。
Advertisement