Template:Item: Difference between revisions
Mastergalen (talk | contribs) m (1 revision) |
CraftSpider (talk | contribs) (Removed red links) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly>{{#invoke:infobox|infobox | ||
| rows = | | rows = | ||
{{infobox row|label=Type|field={{ #if: {{{type|}}} | {{{type}}} | ? }} }} | {{infobox row|label=Type|field={{ #if: {{{type|}}} | {{{type}}} | ? }} }} | ||
{{#if: {{{otherosonly|}}} | {{infobox row|label=Only available in|field={{{otherosonly}}} }} }} | {{#if: {{{otherosonly|}}} | {{infobox row|label=Only available in|field={{{otherosonly}}} }} }} | ||
{{infobox row|label=Durability|field={{ #if: {{{durability|}}} | {{{durability}}} | N/A }} }} | {{infobox row|label=Durability|field={{ #if: {{{durability|}}} | {{{durability}}} | N/A }} }} | ||
{{infobox row|label= | {{infobox row|label=Renewable|field={{ #if: {{{renewable|}}} | {{{renewable}}} | ? }} }} | ||
{{infobox row|label=Stackable|field={{ #if: {{{stackable|}}} | {{{stackable}}} | ? }} }} | {{infobox row|label=Stackable|field={{ #if: {{{stackable|}}} | {{{stackable}}} | ? }} }} | ||
{{#if: {{{multiplevers|}}} | {{#if: {{{multiplevers|}}} | ||
Line 85: | Line 14: | ||
| {{#if: {{{data|}}} | {{infobox row|label=[[Data values|Data value]]|field={{data value|{{{data}}} }} }} }} | | {{#if: {{{data|}}} | {{infobox row|label=[[Data values|Data value]]|field={{data value|{{{data}}} }} }} }} | ||
}} | }} | ||
}}{{#if: {{{ | {{#if: {{NAMESPACE}} | ||
{{#if:{{NAMESPACE}}|| | | | ||
{{#if:{{{type|}}}|[[Category:{{{type}}}]]}} | | {{#ifeq: {{lc: {{{nameid}}} }} | none | ||
| | |||
| {{infobox row|label=Name|field={{ | |||
#if: {{{nameid|}}} | |||
| {{{nameid}}} | |||
| {{lc: {{#replace: {{#if: {{{title|}}} | {{{title}}} | {{BASEPAGENAME}} }} || _ }} }} | |||
}}}} | |||
}} | |||
}} | |||
}}{{ | |||
#if: {{{nocat|}}}{{NAMESPACE}} || | |||
{{#if:{{{type|}}}|{{#ifeq:{{{type}}}|Items||[[Category:{{{type}}}]]}}}} | |||
{{#switch: {{lc: {{{renewable|}}} }} | {{#switch: {{lc: {{{renewable|}}} }} | ||
| yes = [[Category:Renewable resources]] | | yes = [[Category:Renewable resources]] | ||
| no = [[Category:Non-renewable resources]] | | no = [[Category:Non-renewable resources]] | ||
| [[Category:Resources with invalid renewability]] | | [[Category:Resources with invalid renewability]] | ||
}} | }} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{/doc}} | {{/doc}} | ||
[[Category:Infobox templates]] | |||
[[Category:Infobox templates | |||
</noinclude> | </noinclude> |
Latest revision as of 20:57, 10 May 2017
This template uses Module:Infobox, a script written in the Lua programming language. Please see wp:Lua and mw:Extension:Scribunto to learn more about Lua. |
Item
Type |
? |
---|---|
Durability |
N/A |
Renewable |
? |
Stackable |
? |
This template provides a uniform design for usable item pages. When an item restores health, it is recommended to use Template:Food instead.
{{Item |title= |image= |imagesize= |image2= |image2size= |image3= |image3size= |invimage= |invimage2= |invimage3= |invimage4= |invimage5= |invimage6= |invimage7= |invimage8= |invimage9= |invimage10= |invimage11= |invimage12= |invimage13= |invimage14= |invimage15= |invimage16= |invimage17= |invimage18= |invimage19= |invimage20= |invimage21= |invimage22= |invimage23= |invimage24= |invimage25= |type= |otherosonly= |durability= |renewable= |stackable= |availability= |data= |nameid= |firstver= }}
Please note that if the item has multiple data values, use |multipledata=
instead. See below:
Parameter | Function | Default/Example value |
---|---|---|
title |
Optional value to use a different title instead of the page name | {{BASEPAGENAME}}
|
image |
Image of the block (should be approx. 150x150px) | {{{title}}}.png if it exists, otherwise No image.svg (linking to the page where to upload the missing image)
|
imagesize |
Adjusts the size of the image | 150px |
image2 |
Image of the block (should be approx. 150x150px) | None |
image2size |
Adjusts the size of the second image | 150px |
image3 |
Image of the block (should be approx. 150x150px) | None |
image3size |
Adjusts the size of the third image | 150px |
invimage |
Image for object in inventory. Can use None to force no invimage. Uses Template:Grid. | Grid {{{title}}}.png if it exists, otherwise None
|
invimage2 |
Second image for two-state objects in inventory. Uses Template:Grid. | None |
invimage3 |
Third image for three-state objects in inventory. Uses Template:Grid. | None |
invimage4 |
Fourth image for four-state objects in inventory. Uses Template:Grid. | None |
invimage5 |
Fifth image for five-state objects in inventory. Uses Template:Grid. | None |
invimage6 |
Sixth image for six-state objects in inventory. Uses Template:Grid. | None |
invimage7 |
Seventh image for seven-state objects in inventory. Uses Template:Grid. | None |
invimage8 |
Eighth image for eight-state objects in inventory. Uses Template:Grid. | None |
invimage9 |
Ninth image for nine-state objects in inventory. Uses Template:Grid. | None |
invimage10 |
Tenth image for ten-state objects in inventory. Uses Template:Grid. | None |
invimage11 |
Eleventh image for eleven-state objects in inventory. Uses Template:Grid. | None |
invimage12 |
Twelfth image for twelve-state objects in inventory. Uses Template:Grid. | None |
invimage13 |
Thirteenth image for thirteen-state objects in inventory. Uses Template:Grid. | None |
invimage14 |
Fourteenth image for fourteen-state objects in inventory. Uses Template:Grid. | None |
invimage15 |
Fifteenth image for fifteen-state objects in inventory. Uses Template:Grid. | None |
invimage16 |
Sixteenth image for sixteen-state objects in inventory. Uses Template:Grid. | None |
invimage17 |
Seventeenth image for seventeen-state objects in inventory. Uses Template:Grid. | None |
invimage18 |
Eighteenth image for eighteen-state objects in inventory. Uses Template:Grid. | None |
invimage19 |
Nineteenth image for nineteen-state objects in inventory. Uses Template:Grid. | None |
invimage20 |
Twentieth image for twenty-state objects in inventory. Uses Template:Grid. | None |
invimage21 |
Twenty-First image for twenty-one-state objects in inventory. Uses Template:Grid. | None |
invimage22 |
Twenty-Second image for twenty-two-state objects in inventory. Uses Template:Grid. | None |
invimage23 |
Twenty-Third image for twenty-three-state objects in inventory. Uses Template:Grid. | None |
invimage24 |
Twenty-Forth image for twenty-four-state objects in inventory. Uses Template:Grid. | None |
invimage25 |
Twenty-Fifth image for twenty-five-state objects in inventory. Uses Template:Grid. | None |
type |
Type (Weapon, Ranged Weapon, Craftable Item, Tool, etc. ) | ? |
otherosonly |
For use if the item is only available in a specific version of Minecraft. | None |
durability |
How durable the item is | N/A |
renewable |
Whether the item is renewable | ? |
stackable |
Stackable | ? |
availability |
The availability of an item | ? |
data |
Single decimal data value | None |
nameid |
The item's named identifier. Can use None to force no name ID. | title or {{BASEPAGENAME}}
|
multipledata |
Multiple decimal data values, use {{dv}} | None |
firstver |
First version that it was seen in (e.g. Alpha 1.0.17, classic 0.0.23a). | None |
See also
- {{3rd Party Tool}}
- {{Block}}
- {{BlockTileEntity}}
- {{Entity}}
- {{Food}}
- {{Gamemode}}
- {{Item}}
- {{ItemEntity}}
- {{Mod}}
- {{Person}}
- {{Potion}}
- {{Profile}}
- {{Program}}
- {{Structure}}
- {{Technical Block}}
- {{Version nav}}
- Module:Infobox
The above documentation is transcluded from Template:Item/doc. (edit | history)