Template:Infobox block: Difference between revisions

First, I know it's case sensitive. Delete note, add tracking category to find and take care of pages that use the linked file names as parameters. Please see talk page.
No edit summary
 
(383 intermediate revisions by 67 users not shown)
Line 1: Line 1:
<table class="infobox" cellpadding="4" style="width: 22em; font-size: 90%; float:right; border: 1px solid #AAAAAA; margin-left:0.5em">
{{#invoke:infobox|infobox
<tr>
| invimage = title
  <td align="center" colspan=2 bgcolor="#CCCCCC" style="font-size:120%; font-weight: bold;">{{{name|{{BASEPAGENAME}}}}}</td>
| rows =
</tr>
{{#if: {{{rarity|}}} | {{infobox row|class=list-style-none|label=[[minecraft:Rarity|Rarity color]]|field={{ucfirst:{{{rarity|}}}}} }} | }}
<tr valign="top">
{{#if: {{{renewable|}}} | {{infobox row|label=[[minecraft:Renewable resource|Renewable]]|field={{{renewable}}} }} }}
  <td align="center" colspan="2">[[File:{{{image|No image.png}}}|150px|center]]</td>
{{#if: {{{stackable|}}} | {{infobox row|label=Stackable|field={{{stackable}}} {{#if: {{{maxStack|}}} | &nbsp;({{{maxStack}}}) }} }} |<!-- {{{stackable}}} not provided => --->{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing stackability}}}} }}
</tr>
{{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|class=pixel-image|field={{{tool|}}}{{
{{Block/row|label=Type|field={{{type|?}}}}}
  #if: {{{tool2|}}} | {{{tool2|}}}
{{#switch:{{lc:{{{type}}}}}|solid block|solid|block =
}}{{
{{Block/row|label=Requirements|field={{#switch:{{lc:{{{dirt}}}}}|yes=Sunlight and dirt|no=None|sand=Sunlight and sand|#default={{{dirt|?}}}}} }}
  #if: {{{tool3|}}} | {{{tool3|}}}
}}
}} }}
{{Block/row|label=Physics|field={{{gravity|?}}}}}
{{infobox row|label=[[minecraft:Explosion#Blast resistance|Blast resistance]]|field={{ #if: {{{tntres|}}}
{{Block/row|label=Transparency|field={{{transparent|?}}}}}
| {{{tntres}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden tntres}} }}
{{Block/row|label=Luminance|field={{{light|?}}}}}
| {{Blast resistance values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
{{Block/row|label=Tool{{#if:{{{tool2|}}}|s}}|field={{#switch:{{lc:{{{tool|{{{Tool}}}}}}}}
}} }}
|[[file:use-pickaxe.png]]|pick|pickaxe=[[File:Use-pickaxe.png]]<!--
{{infobox row|label=[[minecraft:Breaking#Blocks by hardness|Hardness]]|field={{ #if: {{{hardness|}}}
--->|spade|shovel=[[File:Use-spade.png]]<!--
| {{{hardness}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden hardness}} }}
--->|axe=[[File:Use-axe.png]]<!--
| {{Hardness values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
--->|hoe|ho=[[File:Use-hoe.png]]<!--
}} }}
--->|n/a|none=N/A<!--
{{#if: {{{durability|}}} |{{infobox row|Durability|{{{durability|}}}}}}}
--->|#default=?}}<!--
{{infobox row|label=[[minecraft:Light|Luminous]]|field={{ #if: {{{light|}}} | {{{light}}} {{#if: {{{lightLevel|}}} | &nbsp;({{{lightLevel}}}) }} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing luminance}}}} }} }}
--->{{#switch:{{lc:{{{tool2}}} }}|<!--
{{infobox row|label=[[minecraft:Opacity|Transparent]]|field={{ #if: {{{transparent|}}} | {{{transparent}}} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing transparency}}}} }} }}
--->|pick|pickaxe=[[File:Use-pickaxe.png]]<!--
{{ #if: {{{waterloggable|}}} | {{infobox row|label=[[minecraft:Waterlogging|Waterloggable]]|field={{{waterloggable}}} }} }}
--->|spade|shovel=[[File:Use-spade.png]]<!--
{{ #if: {{{heals|}}} | {{infobox row|label=[[minecraft:Food|Restores]]|field={{{heals}}} }} }}
--->|axe=[[File:Use-axe.png]]<!--
{{infobox row|label=[[minecraft:Flammable|Flammable]]|field={{ #if: {{{flammable|}}} | {{{flammable}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing flammability}}}} }} }}
--->|hoe|ho=[[File:Use-hoe.png]]<!--
{{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}}}} }} }} }}
--->|#default= }}{{#switch:{{{tool|{{{Tool|{{{tool2}}}}}}}}}
{{#if: {{NAMESPACE}} ||
|[[file:use-spade.png]]
{{translation category|project=0|{{
|[[file:use-axe.png]]
  #switch: {{lc: {{{renewable|}}} }}
|[[file:use-hoe.png]]
  | yes = Renewable resources
|[[file:use-spade.png]]=[[Category:Improper Parameter Use]]}}
  | no = Non-renewable resources
}}
  | Resources with invalid renewability
{{#switch:{{lc:{{{type}}}}}|fluid =
}}}}
{{Block/row|label=Speed of fluid movement:|field={{{fluidspeed|?}}}}}
}}<noinclude>
{{Block/row|label=Speed of walking through:|field={{{movespeed|?}}}}}
{{documentation}}
}}
<!-- Put categories/interwiki on the documentation page -->
{{Block/row|label=Data value{{#if:{{{data2|}}}|s|}}|field={{{data|{{#if:{{{datadec|}}}|<!--
</noinclude>
 
The original data values setup, used if datadec is a field
 
---->{{{datadec|?}}} <sub>dec</sub> ({{{datahex|{{dec-hex|{{{datadec|0}}}}}}}} <sub>hex</sub>)|<!--
 
The new formatting
 
---->{{#if:{{{data1name|}}}|'''{{{data1name|}}}'''<br />| }}<!--
----><sub>dec:</sub> {{{data1|35}}} <sub>hex:</sub> {{dec-hex|{{{data1|35}}} }}<br /><!--
 
The optional second data value in the new formatting.
 
---->{{#if:{{{data2|}}}|<!--
------>{{#if:{{{data2name|}}}|'''{{{data2name|}}}'''<br />| }}<!--
------><sub>dec:</sub> {{{data2}}} <sub>hex:</sub> {{dec-hex|{{{data2}}} }}<!--
---->|}}<!--
-->}} }}} }}
</table>{{#if:{{{tool|}}}|[[Category:Pages that the Tool parameter]]}}<noinclude><!---
--->
==Documentation==
'''These usage notes will not be included in articles bearing this template.'''
 
This template provides a uniform design for block pages.
<pre>
{{Block
| name =  
| image =
| type =
| gravity =  
| dirt =  
| transparent =
| light =
| Tool =
| datadec =
| datahex =
}}</pre>
 
{| class=grid
! Parameter
! Function
! Default value
|-
| <code>name</code> || Name of the block || <code><nowiki>{{BASEPAGENAME}}</nowiki></code>
|-
| <code>image</code> || Image of the block (should be approx. 150x150px) || [[:File:No image.png|No image.png]]
|-
| <code>type</code> || Type(solid block, solid, block, or fluid) || ?
|-
| <code>gravity</code> || Affected by gravity? || ?
|-
| <code>dirt</code> || Requires sunlight/dirt? || ?
|-
| <code>transparent</code> || Allows light to pass through? || ?
|-
| <code>light</code> || Emits Light? || ?
|-
| <code>tool</code> || Tool to use || ?
|-
| <code>datadec</code> || Decimal Data Value || ?
|-
| <code>datahex</code> || Hexadecimal Data Value || ?
|-
| <code>data</code> || Data Value (overrides dec and hex values) || <code>datadec</code> and <code>datahex</code>
|}
[[Category:Templates]]</noinclude>
<includeonly>{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Blocks]]}}</includeonly>