Minecraft Wiki
m
KuroUrufu (discussione | contributi)
m (come sopra (la documentazione comunque non è visibile sul template finché l'errore rimane, quindi non cambia nulla))
 
(6 versioni intermedie di 3 utenti non mostrate)
Riga 1: Riga 1:
{{testata documentazione}}
+
<noinclude>{{testata documentazione}}
 
<!-- La documentazione va qua -->
 
<!-- La documentazione va qua -->
 
{{scorciatoia|Slot|Grid}}
 
{{scorciatoia|Slot|Grid}}
Riga 28: Riga 28:
 
To display an inventory item of "Raw Porkchop" with an stack size of 20 you would put: {{t|Slot|Raw Porkchop,20}}
 
To display an inventory item of "Raw Porkchop" with an stack size of 20 you would put: {{t|Slot|Raw Porkchop,20}}
 
;shows
 
;shows
{{Slot|Raw Porkchop,20}}
+
{{Slot|Costoletta di maiale cruda,20}}
   
 
An amount of 2–999 is supported, anything else will not be displayed.
 
An amount of 2–999 is supported, anything else will not be displayed.
Riga 38: Riga 38:
 
The above aliases can be used to shorten common items, such as all wood blocks or adding parts to certain names by default.
 
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}}
+
{{t|Slot|Ogni Tronco;Mela d'oro}}
   
 
;shows
 
;shows
{{Slot|Any Log;Golden Apple}}
+
{{Slot|Ogni Tronco;Mela d'oro}}
   
   
 
When using the alias, parts can be added which will override any parts in the alias.
 
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}}
+
{{t|Slot|Ogni Tronco,4;[&Bella mela d'oro]Mela d'oro incantata}}
   
 
;shows
 
;shows
{{Slot|Any Log,4;[&oShiny Apple]Enchanted Golden Apple}}
+
{{Slot|Ogni Tronco,4;[&Bella mela d'oro]Mela d'oro incantata}}
   
   
Riga 57: Riga 57:
 
The title parameter can be used to set a title for all frames.
 
The title parameter can be used to set a title for all frames.
   
{{t|Slot|Raw Porkchop; Cooked Porkchop|title{{=}}Smelly Porkchop}}
+
{{t|Slot|Costoletta di maiale cruda; Costoletta di maiale cotta|title{{=}}Smelly Porkchop}}
 
;shows
 
;shows
{{Slot|Raw Porkchop; Cooked Porkchop|title=Smelly Porkchop}}
+
{{Slot|Costoletta di maiale cruda; Costoletta di maiale cotta|title=Smelly Porkchop}}
   
   
To remove the title, set it to "none": {{t|Slot|Raw Porkchop; Cooked Porkchop|title{{=}}none}}
+
To remove the title, set it to "none": {{t|Slot|Costoletta di maiale cruda; Costoletta di maiale cotta|title{{=}}none}}
 
;shows
 
;shows
{{Slot|Raw Porkchop; Cooked Porkchop|title=none}}
+
{{Slot|Costoletta di maiale cruda; Costoletta di maiale cotta|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.
 
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}}
+
{{t|Slot|[&b]Spada di diamante}}
 
;shows
 
;shows
{{Slot|[&b]Diamond Sword}}
+
{{Slot|[&b]Spada di 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 (/).
 
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]}}
+
{{t|Slot|[&b&oExcalibur]Spada di ferro[&7Smite V/Fire Aspect I//&9+6 Attack Damage]}}
 
;shows
 
;shows
{{Slot|[&b&oExcalibur]Iron Sword[&7Smite V/Fire Aspect I//&9+6 Attack Damage]}}
+
{{Slot|[&b&oExcalibur]Spada di ferro[&7Smite V/Fire Aspect I//&9+6 Attack Damage]}}
   
 
=== Subframes ===
 
=== Subframes ===
Riga 86: Riga 86:
 
Here, an alias (which resolves to multiple frames) is wrapped in a subframe, and a different wood plank variant is shown each animation cycle:
 
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 Wood Planks};Iron Ingot}}
+
{{t|Slot|{Ogni Assi};Lingotto di ferro}}
 
;shows
 
;shows
{{Slot|{Any Wood Planks};Iron Ingot}}
+
{{Slot|{Ogni Assi};Lingotto di ferro}}
   
 
=== Align ===
 
=== Align ===
 
Align uses the [http://www.w3.org/wiki/CSS/Properties/vertical-align vertical-align] CSS property. For example to align to the middle:
 
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>
+
<code><nowiki>Smells like {{Slot|Costoletta di maiale cruda|align=middle}} in here!</nowiki></code>
 
;shows
 
;shows
Smells like {{Slot|Raw Porkchop|align=middle}} in here!
+
Smells like {{Slot|Costoletta di maiale cruda|align=middle}} in here!
   
 
=== Default ===
 
=== Default ===
Default is always shown and is placed under the image. {{t|Slot|default{{=}}Grid layout Brewing Empty}}{{t|Slot|Splash Mundane Potion|default{{=}}Grid layout Brewing Empty}}
+
Default is always shown and is placed under the image. {{t|Slot|default{{=}}Grid layout Brewing Empty}}{{t|Slot|Pozione ordinaria da lancio|default{{=}}Grid layout Brewing Empty}}
 
;shows
 
;shows
{{Slot|default=Grid layout Brewing Empty}}{{Slot|Splash Mundane Potion|default=Grid layout Brewing Empty}}
+
{{Slot|default=Grid layout Brewing Empty}}{{Slot|Pozione ordinaria da lancio|default=Grid layout Brewing Empty}}
   
 
=== Link ===
 
=== Link ===
To change the link for all frames from the image name put: {{t|Slot|Charcoal|link{{=}}Coal#Charcoal}}
+
To change the link for all frames from the image name put: {{t|Slot|Carbonella|link{{=}}Carbone#Carbonella}}
 
;shows
 
;shows
{{Slot|Charcoal|link=Coal#Charcoal}}
+
{{Slot|Carbonella|link=Carbonella}}
   
   
To remove the link, set link to none: {{t|Slot|Charcoal|link{{=}}none}}
+
To remove the link, set link to none: {{t|Slot|Carbonella|link{{=}}none}}
 
;shows
 
;shows
{{Slot|Charcoal|link=none}}
+
{{Slot|Carbonella|link=none}}
   
 
Note that this retains the title.
 
Note that this retains the title.
Riga 115: Riga 115:
 
=== Mods ===
 
=== Mods ===
 
<!-- TODO: Update for sprite usage -->
 
<!-- TODO: Update for sprite usage -->
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 <code>Grid <Name> (<Mod>).png</code> and should be added to the [[:Category:Grid_mods|Grid mods]] category, which prevents them from being confused with official Minecraft items.<br>This usage is not recommended, however, as all mod pages are being migrated to the FTB wiki.<!--
+
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 <code>Grid <Name> (<Mod>).png</code> and should be added to the [[:Category:Grid_mods|Grid mods]] category, which prevents them from being confused with official Minecraft items.<br>This usage is not recommended, however, as all mod pages are being migrated to the FTB wiki.
For example, to display this mod image [[:File:Grid Bronze Sword (IndustrialCraft).png]]: {{t|Slot|IndustrialCraft:Bronze Sword}} (or {{t|Slot|mod{{=}}IndustrialCraft|Bronze Sword}})
 
;shows
 
{{Slot|IndustrialCraft:Bronze Sword}}
 
   
 
Slots can be animated with a theoretically unlimited amount of frames, between mod items and vanilla items. Frames are separated by semi-colons (;).
 
<pre>{{Slot|
 
Dirt;
 
TNT,64;
 
IndustrialCraft:Bronze Sword,6;
 
;
 
Grass Block,5;
 
Sand;
 
Golden Helmet,12;
 
IndustrialCraft:Bronze Helmet,2;
 
IndustrialCraft:Copper,50;
 
Redstone
 
}}</pre>
 
;shows
 
{{Slot|
 
Dirt;
 
TNT,64;
 
IndustrialCraft:Bronze Sword,6;
 
;
 
Grass Block,5;
 
Sand;
 
Golden Helmet,12;
 
IndustrialCraft:Bronze Helmet,2;
 
IndustrialCraft:Copper,50;
 
Redstone
 
}}
 
 
As you can see, the mod had to be specified for each mod frame, this is where the default mod parameter is useful.
 
{{t|Slot|mod{{=}}IndustrialCraft|Bronze Sword,6; ; Bronze Helmet,12; Copper,50; Copper Dust}}
 
;shows
 
{{Slot|mod=IndustrialCraft|Bronze Sword,6; ; Bronze Helmet,12; Copper,50; Copper Dust}}
 
 
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).
 
<pre>{{Slot|mod=IndustrialCraft|
 
Vanilla:Dirt;
 
vanilla:TNT,64;
 
Bronze Sword,6;
 
;
 
V:Grass Block,5;
 
v:Sand;
 
Minecraft:Golden Helmet,12;
 
Bronze Helmet,2;
 
Copper,50;
 
mc:Redstone Dust
 
}}</pre>
 
;shows
 
{{Slot|mod=IndustrialCraft|
 
Vanilla:Dirt;
 
vanilla:TNT,64;
 
Bronze Sword,6;
 
;
 
V:Grass Block,5;
 
v:Sand;
 
Minecraft:Golden Helmet,12;
 
Bronze Helmet,2;
 
Copper,50;
 
mc:Redstone Dust
 
}}
 
-->
 
 
== Available images ==
 
== Available images ==
   
Riga 187: Riga 124:
   
 
<pre>
 
<pre>
{{Slot|Any Wood Planks}}{{Slot|Any Wood Slab}}{{Slot|Any Wood Stairs}}
+
{{Slot|Ogni Assi}}{{Slot|Ogni Lastra}}{{Slot|Ogni Scalini}}
   
{{Slot|Matching Wood Planks}}{{Slot|Matching Wood Slab}}{{Slot|Matching Wood Stairs}}
+
{{Slot|Assi corrispondente}}{{Slot|Lastra corrispondente}}{{Slot|Scalini corrispondente}}
 
</pre>
 
</pre>
   
 
'''shows'''
 
'''shows'''
   
{{Slot|Any Wood Planks}}{{Slot|Any Wood Slab}}{{Slot|Any Wood Stairs}}
+
{{Slot|Ogni Assi}}{{Slot|Ogni Lastra}}{{Slot|Ogni Scalini}}
   
{{Slot|Matching Wood Planks}}{{Slot|Matching Wood Slab}}{{Slot|Matching Wood Stairs}}
+
{{Slot|Assi corrispondente}}{{Slot|Lastra corrispondente}}{{Slot|Scalini corrispondente}}
   
 
Most items with a durability bar exist as "Damaged [item]".
 
Most items with a durability bar exist as "Damaged [item]".
Riga 205: Riga 142:
   
 
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.
 
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.
{{IU vedi anche}}
+
{{Vedi anche (IU)}}
   
  +
</noinclude>
 
<includeonly>
 
<includeonly>
 
<!-- Template categories/interwiki here -->
 
<!-- Template categories/interwiki here -->

Versione attuale delle 14:18, 8 ago 2021

Questa è la pagina di documentazione e deve essere trascritta sulla pagina template. Vedi Template:Documentazione per più informazioni
Scorciatoia/e
Slot
Grid
Lua logo.png
Questo template usa il Modulo:Inventory slot, con i dati immagazzinati in Modulo:Inventory slot/Aliases.
Questi script sono scritti in 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.

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