Difference between revisions of "Template:AdvancementIcon"

From Offcial Gamemode 4 Wiki
Jump to navigation Jump to search
m (Item Icon (Currently Stack) call now strips whitespace)
Line 3: Line 3:
--><span style = "position:absolute; left:10px; top:10px; line-height:0"><!--
--><span style = "position:absolute; left:10px; top:10px; line-height:0"><!--
| {{{ 1 | Grass Block}}}
| {{#if: | {{{1}}} | Grass Block }}
| link = {{{link|}}}
| link = {{{link|}}}
| inline = true
| inline = true
Line 10: Line 10:
| [[File:{{{file}}}| link{{{link|}}}|32px]]
| [[File:{{{file}}}| link{{{link|}}}|32px]]
| {{Stack
| {{Stack
| {{{1|Grass Block}}}
| {{if: | {{{1}}} | Grass Block }}
| link = {{{link|}}}
| link = {{{link|}}}
| inline = true
| inline = true

Revision as of 03:26, 23 May 2020

Template documentation[view] [edit] [history] [purge]

Using this template, you can create the advancement icons as seen within the game.

The images used are taken from {{InvSprite}}.




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


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
Advancement-plain-raw.png plain|raw
Advancement-oval-raw.png oval|raw
Advancement-fancy-raw.png fancy|raw
Advancement-plain-worn.png plain|worn
Advancement-oval-worn.png oval|worn
Advancement-fancy-worn.png fancy|worn


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.

 | Furnace
 | bg = plain
 | state = raw}}{{AdvancementIcon|Furnace|bg = oval|state = worn}}

 | gm4:SCUBA Helmet
 | bg = fancy
 | state = worn
 | link = SCUBA Gear
}}{{AdvancementIcon|Diamond Hoe|fancy|raw}}



See Also