Template:Infobox block: Difference between revisions

stackability also doesn't apply to all blocks (e.g. air, water, lava) so should be an optional parameter
No edit summary
 
(51 intermediate revisions by 20 users not shown)
Line 1: Line 1:
<includeonly>{{#invoke:infobox|infobox
{{#invoke:infobox|infobox
| invimage = title
| rows =
| rows =
{{#if: {{{rarity|}}} | {{infobox row|class=list-style-none|label=[[Rarity|Rarity color]]|field={{ucfirst:{{{rarity|}}}}} }} | }}
{{#if: {{{rarity|}}} | {{infobox row|class=list-style-none|label=[[minecraft:Rarity|Rarity color]]|field={{ucfirst:{{{rarity|}}}}} }} | }}
{{#if: {{{renewable|}}} | {{infobox row|label=[[Renewable resource|Renewable]]|field={{ #if: {{{renewable|}}} | {{{renewable}}} | ? }} }} }}
{{#if: {{{renewable|}}} | {{infobox row|label=[[minecraft:Renewable resource|Renewable]]|field={{{renewable}}} }} }}
{{#if: {{{stackable|}}} | {{infobox row|label=Stackable|field={{ #if: {{{stackable|}}} | {{{stackable}}} {{#if: {{{maxStack|}}} | &nbsp;({{{maxStack}}}) }} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing stackability}}}} }} }} }}
{{#if: {{{stackable|}}} | {{infobox row|label=Stackable|field={{{stackable}}} {{#if: {{{maxStack|}}} | &nbsp;({{{maxStack}}}) }} }} |<!-- {{{stackable}}} not provided => --->{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing stackability}}}} }}
{{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|class=pixel-image|field={{#vardefineecho: correct-tool | {{
{{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|class=pixel-image|field={{{tool|}}}{{
  #switch: {{ lc: {{{tool|}}} }}
   #if: {{{tool2|}}} | {{{tool2|}}}
  | 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}}
  | 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 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 quickest}}
  | hoe              = {{SlotSprite|Hoe Required|link=Hoe|title=This block can be broken with any tool, but a hoe is the quickest}}
  | 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}}
  | shears            = {{InvSprite|Shears|link=Shears|title=This block can be broken with any tool, but shears are the quickest}}
  | n/a    | none    = None
  | all    | alltools | any | anytool = Any tool
  | #default          = ?
}}
}}{{
}}{{
  #if: {{{tool2|}}} | {{
   #if: {{{tool3|}}} | {{{tool3|}}}
    #switch: {{ lc: {{{tool2}}} }}
    | 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}}
  }}
}}{{
   #if: {{{tool3|}}} | {{
    #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}}
  }}
}} }}
}} }}
{{infobox row|label=[[Explosion#Blast resistance|Blast resistance]]|field={{ #if: {{{tntres|}}}
{{infobox row|label=[[minecraft:Explosion#Blast resistance|Blast resistance]]|field={{ #if: {{{tntres|}}}
| {{{tntres}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden tntres}} }}
| {{{tntres}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden tntres}} }}
| {{Blast resistance values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
| {{Blast resistance values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
}} }}
}} }}
{{infobox row|label=[[Breaking#Blocks by hardness|Hardness]]|field={{ #if: {{{hardness|}}}
{{infobox row|label=[[minecraft:Breaking#Blocks by hardness|Hardness]]|field={{ #if: {{{hardness|}}}
| {{{hardness}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden hardness}} }}
| {{{hardness}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden hardness}} }}
| {{Hardness values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
| {{Hardness values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
}} }}
}} }}
{{infobox row|label=[[Light|Luminant]]|field={{ #if: {{{light|}}} | {{{light}}} {{#if: {{{lightLevel|}}} | &nbsp;({{{lightLevel}}}) }} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing luminance}}}} }} }}
{{#if: {{{durability|}}} |{{infobox row|Durability|{{{durability|}}}}}}}
{{infobox row|label=[[Opacity|Transparent]]|field={{ #if: {{{transparent|}}} | {{{transparent}}} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing transparency}}}} }} }}
{{infobox row|label=[[minecraft:Light|Luminous]]|field={{ #if: {{{light|}}} | {{{light}}} {{#if: {{{lightLevel|}}} | &nbsp;({{{lightLevel}}}) }} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing luminance}}}} }} }}
{{ #if: {{{heals|}}} | {{infobox row|label=[[Food|Restores]]|field={{{heals}}} }} }}
{{infobox row|label=[[minecraft:Opacity|Transparent]]|field={{ #if: {{{transparent|}}} | {{{transparent}}} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing transparency}}}} }} }}
{{infobox row|label=[[Flammable]]|field={{ #if: {{{flammable|}}} | {{{flammable}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing flammability}}}} }} }}
{{ #if: {{{waterloggable|}}} | {{infobox row|label=[[minecraft:Waterlogging|Waterloggable]]|field={{{waterloggable}}} }} }}
{{infobox row|label=Catches fire from [[lava]]|field={{ #if: {{{lavasusceptible|}}} | {{{lavasusceptible}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing lava susceptibility}}}} }} }} }}
{{ #if: {{{heals|}}} | {{infobox row|label=[[minecraft:Food|Restores]]|field={{{heals}}} }} }}
{{infobox row|label=[[minecraft:Flammable|Flammable]]|field={{ #if: {{{flammable|}}} | {{{flammable}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing flammability}}}} }} }}
{{infobox row|label=Catches fire from [https://minecraft.wiki/w/Lava Lava]|field={{ #if: {{{lavasusceptible|}}} | {{{lavasusceptible}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing lava susceptibility}}}} }} }} }}
{{#if: {{NAMESPACE}} ||
{{#if: {{NAMESPACE}} ||
{{translation category|project=0|{{
{{translation category|project=0|{{
Line 73: Line 32:
   | Resources with invalid renewability
   | Resources with invalid renewability
}}}}
}}}}
}}</includeonly><noinclude>
}}<noinclude>
{{documentation}}
{{documentation}}
<!-- Put categories/interwiki on the documentation page -->
<!-- Put categories/interwiki on the documentation page -->
</noinclude>
</noinclude>