Template:AdvancementIcon: Difference between revisions
(No InventoryIcon yet) |
(Icon temp changed to Slot) |
||
Line 3: | Line 3: | ||
{{#if: {{{file|}}} | {{#if: {{{file|}}} | ||
|[[File:{{{file}}}|link{{{link|}}}|32px]] | |[[File:{{{file}}}|link{{{link|}}}|32px]] | ||
|{{ | |{{InventorySlot|{{{1|Grass Block}}}|link={{{link|}}}}} | ||
}}</span></includeonly><noinclude> | }}</span></includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 08:06, 22 May 2020
Using this template, you can create the advancement icons as seen within the game.
The images used are taken from {{InvSprite}}
.
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value).
Usage
Image
Using the first parameter, {{{1}}}
, you can set the image to the specified block or item or a fallback image.
For Gamemode 4 specific items or blocks, gm4:
must prefix the name, e.g., gm4:Boots of Ostara
Background
Optional. The second parameter, {{{bg}}}
, is used to set the background.
Optional. The third parameter, {{{state}}}
, is used to display advancement completion state.
Background | Parameters |
---|---|
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value). |
plain|raw
|
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value). |
oval|raw
|
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value). |
fancy|raw
|
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value). |
plain|worn
|
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value). |
oval|worn
|
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value). |
fancy|worn
|
Link
NOTE: Link is not implemented, as {{AdvancementIcon}}
currently uses {{Stack}}
and not {{InventoryIcon}}
.
Optional. An advancement icon can contain a link using {{{link}}}
.
To link Boots of Ostara, you would use {{AdvancementIcon|gm4:Boots of Ostara|link=Boots of Ostara}}
.
Example Usage
Advancement Icons can be placed inline by placing two {{AdvancementIcon}}
s next to one another, without spaces or newlines.
New lines and spacing within {{AdvancementIcon}}
is ignored, as long as the parameter is stated, e.g., bg = plain
.
The second and third parameters can be written inline, as shown in the last example, but unless the template is written without spaces, the output will fail.
{{AdvancementIcon | Furnace | bg = plain | state = raw}}{{AdvancementIcon|Furnace|bg = oval|state = worn}} {{AdvancementIcon | gm4:SCUBA Helmet | bg = fancy | state = worn | link = SCUBA Gear }}{{AdvancementIcon|Diamond Hoe|fancy|raw}}
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value). Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value).
Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value). Lua error in Module:InventorySlot at line 356: attempt to call method 'match' (a nil value).
See Also
{{InvSprite}}
The above documentation is transcluded from Template:AdvancementIcon/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |