Template:Infobox block: Difference between revisions

mNo edit summary
No edit summary
 
(418 intermediate revisions by 71 users not shown)
Line 1: Line 1:
{| class="infobox" cellpadding="4" style="width: 22em; font-size: 90%; float:right; border: 1px solid #AAAAAA;"
{{#invoke:infobox|infobox
| align="center" colspan=2 bgcolor="#CCCCCC" style="font-size:120%; font-weight: bold;" | {{{name|{{BASEPAGENAME}}}}}
| invimage = title
|- valign="top"
| rows =
| align="center" colspan="2" | [[image:{{{image|No image.png}}}|150px|center]]
{{#if: {{{rarity|}}} | {{infobox row|class=list-style-none|label=[[minecraft:Rarity|Rarity color]]|field={{ucfirst:{{{rarity|}}}}} }} | }}
|- valign="top" style="background: #F9F9F9;"
{{#if: {{{renewable|}}} | {{infobox row|label=[[minecraft:Renewable resource|Renewable]]|field={{{renewable}}} }} }}
| style="white-space: nowrap; font-weight: bold;" | Type
{{#if: {{{stackable|}}} | {{infobox row|label=Stackable|field={{{stackable}}} {{#if: {{{maxStack|}}} | &nbsp;({{{maxStack}}}) }} }} |<!-- {{{stackable}}} not provided => --->{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing stackability}}}} }}
| {{{type|?}}}
{{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|class=pixel-image|field={{{tool|}}}{{
|- valign="top" style="background: #FFFFFF;"
  #if: {{{tool2|}}} | {{{tool2|}}}
| style="white-space: nowrap; font-weight: bold;" | Affected by gravity?
}}{{
| {{{gravity|?}}}
  #if: {{{tool3|}}} | {{{tool3|}}}
|- valign="top" style="background: #F9F9F9;"
}} }}
| style="white-space: nowrap; font-weight: bold;" | Requires sunlight/dirt?
{{infobox row|label=[[minecraft:Explosion#Blast resistance|Blast resistance]]|field={{ #if: {{{tntres|}}}
| {{{dirt|?}}}
| {{{tntres}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden tntres}} }}
|- valign="top" style="background: #FFFFFF;"
| {{Blast resistance values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
| style="white-space: nowrap; font-weight: bold;" | Allows light to pass through?
}} }}
| {{{transparent|?}}}
{{infobox row|label=[[minecraft:Breaking#Blocks by hardness|Hardness]]|field={{ #if: {{{hardness|}}}
|- valign="top" style="background: #F9F9F9;"
| {{{hardness}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden hardness}} }}
| style="white-space: nowrap; font-weight: bold;" | Emits Light?
| {{Hardness values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
| {{{light|?}}}
}} }}
|- valign="top" style="background: #FFFFFF;"
{{#if: {{{durability|}}} |{{infobox row|Durability|{{{durability|}}}}}}}
| style="white-space: nowrap; font-weight: bold;" | Data Value
{{infobox row|label=[[minecraft:Light|Luminous]]|field={{ #if: {{{light|}}} | {{{light}}} {{#if: {{{lightLevel|}}} | &nbsp;({{{lightLevel}}}) }} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing luminance}}}} }} }}
| style="white-space: nowrap;" | {{{datadec|?}}} <sub>dec</sub> ({{{datahex|?}}} <sub>hex</sub>)
{{infobox row|label=[[minecraft:Opacity|Transparent]]|field={{ #if: {{{transparent|}}} | {{{transparent}}} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing transparency}}}} }} }}
|}<noinclude>
{{ #if: {{{waterloggable|}}} | {{infobox row|label=[[minecraft:Waterlogging|Waterloggable]]|field={{{waterloggable}}} }} }}
==Documentation==
{{ #if: {{{heals|}}} | {{infobox row|label=[[minecraft:Food|Restores]]|field={{{heals}}} }} }}
'''These usage notes will not be included in articles bearing this template.'''
{{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}}}} }} }} }}
This template provides a uniform design for block pages.
{{#if: {{NAMESPACE}} ||
<pre>
{{translation category|project=0|{{
{{Block
  #switch: {{lc: {{{renewable|}}} }}
| name =  
  | yes = Renewable resources
| image =
  | no = Non-renewable resources
| type =  
  | Resources with invalid renewability
| gravity =
}}}}
| dirt =  
}}<noinclude>
| transparent =
{{documentation}}
| light =
<!-- Put categories/interwiki on the documentation page -->
| datadec =
</noinclude>
| 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 <sup>(Deprecated?)</sup> || ?
|-
| <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>datadec</code> || Decimal Data Value || ?
|-
| <code>datahex</code> || Hexadecimal Data Value || ?
|}
[[Category:Templates]]</noinclude>
<includeonly>[[Category:Blocks]]</includeonly>