Template:Infobox block: Difference between revisions

Undo revision 27994 by Kore64 (talk) Sorry, thats just not appropriate. Try and keep your edits encyclopaedic in nature.
No edit summary
 
(332 intermediate revisions by 59 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 block 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|}}}{{
{{#if:{{{image2|}}}|<tr valign="top"><td align="center" colspan="2">[[File:{{{image2}}}|150px|center]]</td></tr>}}
  #if: {{{tool2|}}} | {{{tool2|}}}
{{#if:{{{invimage|}}}|<tr valign="top"><td align="center" colspan="2">[[File:{{{invimage}}}|36px|center]]</td></tr>}}
}}{{
{{#if:{{{invimage2|}}}|<tr valign="top"><td align="center" colspan="2">[[File:{{{invimage2}}}|36px|center]]</td></tr>}}
  #if: {{{tool3|}}} | {{{tool3|}}}
{{Block/row2|label=Type|field={{{type|?}}}}}
}} }}
{{#switch:{{lc:{{{type}}}}}|solid block|solid|block =
{{infobox row|label=[[minecraft:Explosion#Blast resistance|Blast resistance]]|field={{ #if: {{{tntres|}}}
{{Block/row|label=Requirements|field={{#switch:{{lc:{{{dirt}}}}}|yes=Sunlight and dirt|no=None|sand=Sunlight and sand|#default={{{dirt|?}}}}}}}}}
| {{{tntres}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden tntres}} }}
{{Block/row2|label=Physics|field={{{gravity|?}}}}}
| {{Blast resistance values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
{{Block/row|label=Transparency|field={{{transparent|?}}}}}
}} }}
{{Block/row2|label=Luminance|field={{{light|?}}}}}
{{infobox row|label=[[minecraft:Breaking#Blocks by hardness|Hardness]]|field={{ #if: {{{hardness|}}}
{{Block/row|label=[[TNT#Explosion Resistance|TNT Resistance]]|field={{{tntres|? blocks}}}}}
| {{{hardness}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden hardness}} }}
{{Block/row2|label=Tool{{#if:{{{tool2|}}}|s}}|field={{#switch:{{lc:{{{tool|{{{Tool}}}}}}}}<!--
| {{Hardness values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
-->|pick|pickaxe=[[File:Use-pickaxe.png|32px|link=Tools#Pickaxe|Pickaxe]]<!--
}} }}
-->|spade|shovel=[[File:Use-spade.png|32px|link=Tools#Shovel|Shovel]]<!--
{{#if: {{{durability|}}} |{{infobox row|Durability|{{{durability|}}}}}}}
-->|axe=[[File:Use-axe.png|32px|link=Tools#Axe|Axe]]<!--
{{infobox row|label=[[minecraft:Light|Luminous]]|field={{ #if: {{{light|}}} | {{{light}}} {{#if: {{{lightLevel|}}} | &nbsp;({{{lightLevel}}}) }} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing luminance}}}} }} }}
-->|hoe=[[File:Use-hoe.png|32px|link=Tools#Hoe|Hoe]]<!--
{{infobox row|label=[[minecraft:Opacity|Transparent]]|field={{ #if: {{{transparent|}}} | {{{transparent}}} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing transparency}}}} }} }}
-->|bucket|pail=[[File:Use-bucket.png|32px|link=Tools#Bucket|Bucket]]<!--
{{ #if: {{{waterloggable|}}} | {{infobox row|label=[[minecraft:Waterlogging|Waterloggable]]|field={{{waterloggable}}} }} }}
-->|sword=[[File:Use-sword.png|32px|Link=Tools#Sword|Sword]]<!--
{{ #if: {{{heals|}}} | {{infobox row|label=[[minecraft:Food|Restores]]|field={{{heals}}} }} }}
-->|n/a|none=None<!--
{{infobox row|label=[[minecraft:Flammable|Flammable]]|field={{ #if: {{{flammable|}}} | {{{flammable}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing flammability}}}} }} }}
-->|all|alltools|any|anytool=Any tool<!--
{{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=?}}<!--
{{#if: {{NAMESPACE}} ||
-->{{#if:{{{tool2|}}}|{{#switch:{{lc:{{{tool2}}}}}<!--
{{translation category|project=0|{{
-->|pick|pickaxe=[[File:Use-pickaxe.png|32px|link=Tools#Pickaxe|Pickaxe]]<!--
  #switch: {{lc: {{{renewable|}}} }}
-->|spade|shovel=[[File:Use-spade.png|32px|link=Tools#Shovel|Shovel]]<!--
  | yes = Renewable resources
-->|axe=[[File:Use-axe.png|32px|link=Tools#Axe|Axe]]<!--
  | no = Non-renewable resources
-->|hoe=[[File:Use-hoe.png|32px|link=Tools#Hoe|Hoe]]}}}}}}
  | Resources with invalid renewability
{{Block/row|label=Stackable|field={{{stackable|?}}}}}
}}}}
{{#switch:{{lc:{{{type}}}}}|fluid =
}}<noinclude>
{{Block/row2|label=Speed of fluid movement|field={{{fluidspeed|?}}}}}
{{documentation}}
{{Block/row|label=Speed of walking through|field={{{movespeed|?}}}}}}}
<!-- Put categories/interwiki on the documentation page -->
{{Block/row2|label=[[Data values|Data value]]{{#if:{{{data2|}}}|s|}}|field={{{data|{{#if:{{{datadec|}}}|<!--
</noinclude>
 
---->|{{#if:{{{data1name|}}}|'''{{{data1name|}}}'''<br />| }}<!--
----><sub>dec:</sub> {{{data1|00}}} <sub>hex:</sub> {{dec-hex|{{{data1|00}}} }}<br /><!--
 
The optional second data value.
 
---->{{#if:{{{data2|}}}|<!--
------>{{#if:{{{data2name|}}}|'''{{{data2name|}}}'''<br />| }}<!--
------><sub>dec:</sub> {{{data2}}} <sub>hex:</sub> {{dec-hex|{{{data2}}} }}<!--
---->|}}<!--
-->}} }}} }}
</table><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
|image
|image2=
|invimage=
|invimage2=
|type=
|gravity=
|dirt=
|transparent=
|light=
|tntres=
|tool=
|stackable=
|data1name=
|data1=
|data2name=
|data2=
|fluidspeed=
|movespeed=
}}</pre>
 
{| class=grid
! Parameter
! Function
! Default value
|-
| <code>name</code> || Only needed to change the name from the page name || <code><nowiki>{{BASEPAGENAME}}</nowiki></code>
|-
| <code>image</code> || Image of the block (should be approx. 150x150px) || [[:File:No block image.png|No block image.png]]
|-
| <code>image2</code> || Second image for two-state blocks (also approx. 150x150px) || ''None''
|-
| <code>invimage</code> || Image for object in inventory (should be approx. 36x36px) || ''None''
|-
| <code>invimage2</code> || Second image for two-state objects in inventory (should be approx. 36x36px) || ''None''
|-
| <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>tntres</code> || How many blocks in any direction will a TNT explosion pass through? || ?
|-
| <code>tool</code> || Tool to use || ?
|-
| <code>stackable</code> || Stackable || ?
|-
| <code>data1name</code> || If using multiple data values, specify a name || ''None''
|-
| <code>data1</code> || Decimal Data Value 1 || 00
|-
| <code>data2name</code> || Data 2's name || ''None''
|-
| <code>data2</code> || Decimal Data Value 2 || ''None''
|}
[[Category:Templates]]</noinclude>
<includeonly>{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{#ifeq:{{lc:{{{type|}}}}}|item|[[Category:Items]]|[[Category:Blocks]]}}}}</includeonly>