Template:Infobox block: Difference between revisions

mNo edit summary
m rebase dev changes onto prod
Line 1: Line 1:
<onlyinclude><infobox>
<includeonly>{{#invoke:infobox|infobox
<title source="title"><default>{{BASEPAGENAME}}</default></title>
| rows =
<panel>
{{#if: {{{rarity|}}} | {{infobox row|class=list-style-none|label=[[Rarity|Rarity color]]|field={{ucfirst:{{{rarity|}}}}} }} | }}
<section>
{{#if: {{{renewable|}}} | {{infobox row|label=[[Renewable resource|Renewable]]|field={{{renewable}}} }} }}
<label>{{{group}}}</label>
{{#if: {{{stackable|}}} | {{infobox row|label=Stackable|field={{{stackable}}} {{#if: {{{maxStack|}}} | &nbsp;({{{maxStack}}}) }} }} |<!-- {{{stackable}}} not provided => --->{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing stackability}}}} }}
<image source="1-1" />
{{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|class=pixel-image|field={{#vardefineecho: correct-tool | {{
<image source="1-2" />
  #switch: {{ lc: {{{tool|}}} }}
<image source="1-3" />
  | pickaxe          = {{SlotSprite|Pickaxe Required|link=Pickaxe|title=This block can be broken with any tool, but a pickaxe is the quickest}}
</section>
  | wooden pickaxe    = {{InvSprite|Wooden Pickaxe|link=Pickaxe|title=A wooden pickaxe or better is required to mine this block}}
<section>
  | stone pickaxe    = {{InvSprite|Stone Pickaxe|link=Pickaxe|title=A stone pickaxe or better is required to mine this block}}
<label>{{{group2}}}</label>
  | iron pickaxe      = {{InvSprite|Iron Pickaxe|link=Pickaxe|title=An iron pickaxe or better is required to mine this block}}
<image source="2-1" />
  | diamond pickaxe  = {{InvSprite|Diamond Pickaxe|link=Pickaxe|title=A diamond pickaxe or better is required to mine this block}}
<image source="2-2" />
  | shovel            = {{SlotSprite|Shovel Required|link=Shovel|This block can be broken with any tool, but a shovel is the quickest}}
<image source="2-3" />
  | wooden shovel    = {{InvSprite|Wooden Shovel|link=Shovel|title=A wooden shovel or better is required to mine this block}}
</section>
  | axe              = {{SlotSprite|Axe Required|link=Axe|title=This block can be broken with any tool, but an axe is the quickest}}
<section>
  | hoe              = {{SlotSprite|Hoe Required|link=Hoe|title=This block can be broken with any tool, but a hoe is the quickest}}
<label>{{{group3}}}</label>
  | bucket            = {{SlotSprite|Bucket Required|link=Bucket|title=This block can only be picked up using a bucket}}
<image source="3-1" />
  | sword            = {{SlotSprite|Sword Required|link=Sword|title=This block can be broken with any tool, but a sword is the quickest; however it still takes double damage}}
<image source="3-2" />
  | shears            = {{InvSprite|Shears|link=Shears|title=This block can be broken with any tool, but shears are the quickest}}
<image source="3-3" />
  | brush            = {{InvSprite|Brush|link=Brush|title=This block can excavated with a brush}}
</section>
   | n/a    | none    = None
<section>
  | all    | alltools | any | anytool = Any tool
<label>{{{group4}}}</label>
  | #default          = ?
<image source="4-1" />
}}
<image source="4-2" />
}}{{
<image source="4-3" />
  #if: {{{tool2|}}} | {{
</section>
    #switch: {{ lc: {{{tool2}}} }}
<section>
    | pickaxe          = {{SlotSprite|Pickaxe Required|link=Pickaxe|title=This block can be broken with any tool, but a pickaxe is the second quickest}}
<label>{{{group5}}}</label>
    | wooden pickaxe    = {{InvSprite|Wooden Pickaxe|link=Pickaxe|title=A wooden pickaxe or better is required to mine this block}}
<image source="5-1" />
    | stone pickaxe    = {{InvSprite|Stone Pickaxe|link=Pickaxe|title=A stone pickaxe or better is required to mine this block}}
<image source="5-2" />
    | iron pickaxe      = {{InvSprite|Iron Pickaxe|link=Pickaxe|title=An iron pickaxe or better is required to mine this block}}
<image source="5-3" />
    | diamond pickaxe  = {{InvSprite|Diamond Pickaxe|link=Pickaxe|title=A diamond pickaxe or better is required to mine this block}}
</section>
    | shovel            = {{SlotSprite|Shovel Required|link=Shovel|This block can be broken with any tool, but a shovel is the second quickest}}
</panel>
    | wooden shovel    = {{InvSprite|Wooden Shovel|link=Shovel|title=A wooden shovel or better is required to mine this block}}
<image source="image"><default>{{
    | axe              = {{SlotSprite|Axe Required|link=Axe|title=This block can be broken with any tool, but an axe is the second quickest}}
#if: {{PROTECTIONEXPIRY:edit|File:{{BASEPAGENAME}}.png}} <!-- Don't use #ifexist, because it creates red links -->
    | hoe              = {{SlotSprite|Hoe Required|link=Hoe|title=This block can be broken with any tool, but a hoe is the second quickest}}
| {{#if:{{{group|}}}||File:{{BASEPAGENAME}}.png}}
    | sword            = {{SlotSprite|Sword Required|link=Sword|title=This block can be broken with any tool, but a sword is the second quickest; however it still takes double damage}}
}}</default></image>
    | shears            = {{InvSprite|Shears|link=Shears|title=This block can be broken with any tool, but shears are the second quickest}}
<image source="image2"/>
   }}
<image source="image3"/>
}}{{
<navigation name="extratext">{{{extratext|}}}</navigation>
  #if: {{{tool3|}}} | {{
<group>
    #switch: {{ lc: {{{tool3}}} }}
<data source="rarity"><label>[[Rarity|Rarity color]]</label></data>
    | pickaxe          = {{SlotSprite|Pickaxe Required|link=Pickaxe|title=This block can be broken with any tool, but a pickaxe is the third quickest}}
<data source="renewable"><label>[[Renewable resource|Renewable]]</label></data>
    | wooden pickaxe    = {{InvSprite|Wooden Pickaxe|link=Pickaxe|title=A wooden pickaxe or better is required to mine this block}}
<data source="stackable">
    | stone pickaxe    = {{InvSprite|Stone Pickaxe|link=Pickaxe|title=A stone pickaxe or better is required to mine this block}}
<label>Stackable</label>
    | iron pickaxe      = {{InvSprite|Iron Pickaxe|link=Pickaxe|title=An iron pickaxe or better is required to mine this block}}
<format>{{{stackable}}} {{#if: {{{maxStack|}}} | &#160;({{{maxStack}}}) }}</format>
    | diamond pickaxe  = {{InvSprite|Diamond Pickaxe|link=Pickaxe|title=A diamond pickaxe or better is required to mine this block}}
<default>{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing stackability}}}}</default>
    | shovel            = {{SlotSprite|Shovel Required|link=Shovel|This block can be broken with any tool, but a shovel is the third quickest}}
</data>
    | wooden shovel    = {{InvSprite|Wooden Shovel|link=Shovel|title=A wooden shovel or better is required to mine this block}}
<data source="tool">
    | axe              = {{SlotSprite|Axe Required|link=Axe|title=This block can be broken with any tool, but an axe is the third quickest}}
<label>[[Tool]]{{#if: {{{tool2|}}}|s}}</label>
    | hoe              = {{SlotSprite|Hoe Required|link=Hoe|title=This block can be broken with any tool, but a hoe is the third quickest}}
<format>{{
    | sword            = {{SlotSprite|Sword Required|link=Sword|title=This block can be broken with any tool, but a sword is the third quickest; however it still takes double damage}}
#switch: {{lc: {{{tool}}}}}
    | shears            = {{InvSprite|Shears|link=Shears|title=This block can be broken with any tool, but shears are the third quickest}}
| pickaxe          = {{SlotSprite|Pickaxe Required|link=Pickaxe|title=This block can be broken with any tool, but a pickaxe is the quickest}}
  }}
| wooden pickaxe    = {{InvSprite|Wooden Pickaxe|link=Pickaxe|title=A wooden pickaxe or better is required to mine this block}}
}} }}
| stone pickaxe    = {{InvSprite|Stone Pickaxe|link=Pickaxe|title=A stone pickaxe or better is required to mine this block}}
{{infobox row|label=[[Explosion#Blast resistance|Blast resistance]]|field={{ #if: {{{tntres|}}}
| iron pickaxe      = {{InvSprite|Iron Pickaxe|link=Pickaxe|title=An iron pickaxe or better is required to mine this block}}
| {{{tntres}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden tntres}} }}
| diamond pickaxe   = {{InvSprite|Diamond Pickaxe|link=Pickaxe|title=A diamond pickaxe or better is required to mine this block}}
| {{Blast resistance values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
| shovel = {{SlotSprite|Shovel Required|link=Shovel|This block can be broken with any tool, but a shovel is the quickest}}
}} }}
| wooden shovel    = {{InvSprite|Wooden Shovel|link=Shovel|title=A wooden shovel or better is required to mine this block}}
{{infobox row|label=[[Breaking#Blocks by hardness|Hardness]]|field={{ #if: {{{hardness|}}}
| axe              = {{SlotSprite|Axe Required|link=Axe|title=This block can be broken with any tool, but an axe is the quickest}}
| {{{hardness}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden hardness}} }}
| hoe              = {{SlotSprite|Hoe Required|link=Hoe|title=This block can be broken with any tool, but a hoe is the quickest}}
| {{Hardness values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
| bucket            = {{SlotSprite|Bucket Required|link=Bucket|title=This block can only be picked up using a bucket}}
}} }}
| sword            = {{SlotSprite|Sword Required|link=Sword|title=This block can be broken with any tool, but a sword is the quickest; however it still takes double damage}}
{{infobox row|label=[[Light|Luminous]]|field={{ #if: {{{light|}}} | {{{light}}} {{#if: {{{lightLevel|}}} | &nbsp;({{{lightLevel}}}) }} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing luminance}}}} }} }}
| shears            = {{InvSprite|Shears|link=Shears|title=This block can be broken with any tool, but shears are the quickest}}
{{infobox row|label=[[Opacity|Transparent]]|field={{ #if: {{{transparent|}}} | {{{transparent}}} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing transparency}}}} }} }}
| n/a | none        = None
{{ #if: {{{heals|}}} | {{infobox row|label=[[Food|Restores]]|field={{{heals}}} }} }}
| all | alltools | any | anytool = Any tool
{{infobox row|label=[[Flammable]]|field={{ #if: {{{flammable|}}} | {{{flammable}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing flammability}}}} }} }}
}}{{
{{infobox row|label=Catches fire from [[lava]]|field={{ #if: {{{lavasusceptible|}}} | {{{lavasusceptible}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing lava susceptibility}}}} }} }} }}
#switch: {{lc: {{{tool2|}}}}}
{{#if: {{NAMESPACE}} ||
| pickaxe          = {{SlotSprite|Pickaxe Required|link=Pickaxe|title=This block can be broken with any tool, but a pickaxe is the second quickest}}
| wooden pickaxe    = {{InvSprite|Wooden Pickaxe|link=Pickaxe|title=A wooden pickaxe or better is required to mine this block}}
| stone pickaxe    = {{InvSprite|Stone Pickaxe|link=Pickaxe|title=A stone pickaxe or better is required to mine this block}}
| iron pickaxe      = {{InvSprite|Iron Pickaxe|link=Pickaxe|title=An iron pickaxe or better is required to mine this block}}
| diamond pickaxe   = {{InvSprite|Diamond Pickaxe|link=Pickaxe|title=A diamond pickaxe or better is required to mine this block}}
| shovel            = {{SlotSprite|Shovel Required|link=Shovel|This block can be broken with any tool, but a shovel is the second quickest}}
| wooden shovel    = {{InvSprite|Wooden Shovel|link=Shovel|title=A wooden shovel or better is required to mine this block}}
| axe              = {{SlotSprite|Axe Required|link=Axe|title=This block can be broken with any tool, but an axe is the second quickest}}
| hoe              = {{SlotSprite|Hoe Required|link=Hoe|title=This block can be broken with any tool, but a hoe is the second quickest}}
| sword            = {{SlotSprite|Sword Required|link=Sword|title=This block can be broken with any tool, but a sword is the second quickest; however it still takes double damage}}
| shears            = {{InvSprite|Shears|link=Shears|title=This block can be broken with any tool, but shears are the second quickest}}
              }}{{#switch: {{lc: {{{tool3|}}}}}
| pickaxe          = {{SlotSprite|Pickaxe Required|link=Pickaxe|title=This block can be broken with any tool, but a pickaxe is the third quickest}}
| wooden pickaxe    = {{InvSprite|Wooden Pickaxe|link=Pickaxe|title=A wooden pickaxe or better is required to mine this block}}
| stone pickaxe    = {{InvSprite|Stone Pickaxe|link=Pickaxe|title=A stone pickaxe or better is required to mine this block}}
| iron pickaxe      = {{InvSprite|Iron Pickaxe|link=Pickaxe|title=An iron pickaxe or better is required to mine this block}}
| diamond pickaxe  = {{InvSprite|Diamond Pickaxe|link=Pickaxe|title=A diamond pickaxe or better is required to mine this block}}
| shovel            = {{SlotSprite|Shovel Required|link=Shovel|This block can be broken with any tool, but a shovel is the third quickest}}
| wooden shovel    = {{InvSprite|Wooden Shovel|link=Shovel|title=A wooden shovel or better is required to mine this block}}
| axe              = {{SlotSprite|Axe Required|link=Axe|title=This block can be broken with any tool, but an axe is the third quickest}}
| hoe              = {{SlotSprite|Hoe Required|link=Hoe|title=This block can be broken with any tool, but a hoe is the third quickest}}
| sword            = {{SlotSprite|Sword Required|link=Sword|title=This block can be broken with any tool, but a sword is the third quickest; however it still takes double damage}}
| shears            = {{InvSprite|Shears|link=Shears|title=This block can be broken with any tool, but shears are the third quickest}}
}}</format>
<default>?</default>
</data>
<data source="tntres">
<label>[[Explosion#Blast resistance|Blast resistance]]</label>
<default>{{Blast resistance values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}</default>
<format>{{{tntres|}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden tntres}} }}</format>
</data>
<data source="hardness">
<label>[[Breaking#Blocks by hardness|Hardness]]</label>
<default>{{Hardness values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}</default>
<format>{{{hardness|}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden hardness}}}}</format>
</data>
<data source="light">
<label>[[Light|Luminous]]</label>
<format>{{{light}}} {{#if: {{{lightLevel|}}} | &#160;({{{lightLevel}}})}}</format>
<default>? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing luminance}}}}</default>
</data>
<data source="transparent">
<label>[[Opacity|Transparent]]</label>
<default>? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing transparency}}}}</default>
</data>
<data source="flammable">
<label>[[Flammable]]</label>
<default>?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing flammability}}}}</default>
</data>
<data source="lavasusceptible">
<label>Catches [[fire]] from [[lava]]</label>
<default>?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing lava susceptibility}}}}</default>
</data>
<data source="heals"><label>Heals</label></data>
</group>
</infobox><!--
 
-->{{#if: {{NAMESPACE}} ||
{{translation category|project=0|{{
{{translation category|project=0|{{
   #switch: {{lc: {{{renewable|}}} }}
   #switch: {{lc: {{{renewable|}}} }}
Line 131: Line 73:
   | no = Non-renewable resources
   | no = Non-renewable resources
   | Resources with invalid renewability
   | Resources with invalid renewability
}}}}}}<!--
}}}}
 
}}</includeonly><noinclude>
--></onlyinclude><noinclude>
{{documentation}}
{{Documentation}}
<!-- Put categories/interwiki on the documentation page -->
<!-- Put categories/interwiki on the documentation page -->
</noinclude>
</noinclude>