Template:Infobox block: Difference between revisions

m excellent, no visible issues. some minor tweaks, will rewrite the rest tomorrow
No edit summary
 
(311 intermediate revisions by 54 users not shown)
Line 1: Line 1:
{{infobox common
{{#invoke:infobox|infobox
| imagearea =
| invimage = title
[[File:{{{image|No block image.png}}}|150px|center]]
{{#if:{{{image2|}}}|[[File:{{{image2}}}|150px|center]]}}
{{#if:{{{image3|}}}|[[File:{{{image3}}}|150px|center]]}}
{{#if:{{{invimage|}}}|[[File:{{{invimage}}}|36px]] {{#if:{{{invimage2|}}}| [[File:{{{invimage2}}}|36px]] {{#if:{{{invimage3|}}}| [[File:{{{invimage3}}}|36px]]}} }} }}
| rows =
| rows =
{{infobox row|label=Type|field={{{type|?}}}}}
{{#if: {{{rarity|}}} | {{infobox row|class=list-style-none|label=[[minecraft:Rarity|Rarity color]]|field={{ucfirst:{{{rarity|}}}}} }} | }}
{{#switch:{{lc:{{{type|solid}}}}}|solid block|solid|block = {{infobox row|label=Requirements|field={{#switch:{{lc:{{{dirt}}}}}|yes=Sunlight and dirt|no=None|sand=Sunlight and sand|#default={{{dirt|?}}}}}}} }}
{{#if: {{{renewable|}}} | {{infobox row|label=[[minecraft:Renewable resource|Renewable]]|field={{{renewable}}} }} }}
{{infobox row|label=Physics|field={{{gravity|?}}}}}
{{#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=Transparency|field={{{transparent|?}}}}}
{{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|class=pixel-image|field={{{tool|}}}{{
{{infobox row|label=Luminance|field={{{light|?}}}}}
  #if: {{{tool2|}}} | {{{tool2|}}}
{{infobox row|label=[[Explosion#Block_Resistance|Block Resistance]]|field={{{tntres|? blocks}}}}}
}}{{
{{infobox row|label=Tool{{#if:{{{tool2|}}}|s}}|field={{#switch:{{lc:{{{tool|}}}}}<!--
  #if: {{{tool3|}}} | {{{tool3|}}}
-->|pick|pickaxe=[[File:Use-pickaxe.png|32px|link=Tools#Pickaxe|Pickaxe]]<!--
}} }}
-->|spade|shovel=[[File:Use-spade.png|32px|link=Tools#Shovel|Shovel]]<!--
{{infobox row|label=[[minecraft:Explosion#Blast resistance|Blast resistance]]|field={{ #if: {{{tntres|}}}
-->|axe=[[File:Use-axe.png|32px|link=Tools#Axe|Axe]]<!--
| {{{tntres}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden tntres}} }}
-->|hoe=[[File:Use-hoe.png|32px|link=Tools#Hoe|Hoe]]<!--
| {{Blast resistance values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
-->|bucket|pail=[[File:Use-bucket.png|32px|link=Tools#Bucket|Bucket]]<!--
}} }}
-->|sword=[[File:Use-sword.png|32px|link=Tools#Sword|Sword]]<!--
{{infobox row|label=[[minecraft:Breaking#Blocks by hardness|Hardness]]|field={{ #if: {{{hardness|}}}
-->|n/a|none=None<!--
| {{{hardness}}}{{#if: {{NAMESPACE}} || {{translation category|project=0|Pages with overridden hardness}} }}
-->|all|alltools|any|anytool=Any tool<!--
| {{Hardness values | {{#if: {{{title|}}} | {{{title}}} | {{#titleparts: {{BASEPAGENAME}} }} }} }}
-->|#default=?}}<!--
}} }}
-->{{#if:{{{tool2|}}}|{{#switch:{{lc:{{{tool2}}}}}<!--
{{#if: {{{durability|}}} |{{infobox row|Durability|{{{durability|}}}}}}}
-->|pick|pickaxe=[[File:Use-pickaxe.png|32px|link=Tools#Pickaxe|Pickaxe]]<!--
{{infobox row|label=[[minecraft:Light|Luminous]]|field={{ #if: {{{light|}}} | {{{light}}} {{#if: {{{lightLevel|}}} | &nbsp;({{{lightLevel}}}) }} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing luminance}}}} }} }}
-->|spade|shovel=[[File:Use-spade.png|32px|link=Tools#Shovel|Shovel]]<!--
{{infobox row|label=[[minecraft:Opacity|Transparent]]|field={{ #if: {{{transparent|}}} | {{{transparent}}} | ? {{#if: {{NAMESPACE}} || {{translation category|project=0|Missing transparency}}}} }} }}
-->|axe=[[File:Use-axe.png|32px|link=Tools#Axe|Axe]]<!--
{{ #if: {{{waterloggable|}}} | {{infobox row|label=[[minecraft:Waterlogging|Waterloggable]]|field={{{waterloggable}}} }} }}
-->|hoe=[[File:Use-hoe.png|32px|link=Tools#Hoe|Hoe]]}}}} }}
{{ #if: {{{heals|}}} | {{infobox row|label=[[minecraft:Food|Restores]]|field={{{heals}}} }} }}
{{infobox row|label=Stackable|field={{{stackable|?}}}}}
{{infobox row|label=[[minecraft:Flammable|Flammable]]|field={{ #if: {{{flammable|}}} | {{{flammable}}} | ?{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing flammability}}}} }} }}
{{#switch:{{lc:{{{type|fluid}}}}}|fluid =
{{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}}}} }} }} }}
{{infobox row|label=Speed of fluid movement|field={{{fluidspeed|?}}}}}
{{#if: {{NAMESPACE}} ||
{{infobox row|label=Speed of walking through|field={{{movespeed|?}}}}}}}
{{translation category|project=0|{{
{{infobox row|label=[[Data values|Data value]]{{#if:{{{data2|}}}|s|}}|field={{{data|{{#if:{{{datadec|}}}|<!--
  #switch: {{lc: {{{renewable|}}} }}
---->|{{#if:{{{data1name|}}}|'''{{{data1name|}}}'''<br />| }}<!--
  | yes = Renewable resources
----><sub>dec:</sub> {{{data1|00}}} <sub>hex:</sub> {{dec-hex|{{{data1|00}}} }}<br /><!--
  | no = Non-renewable resources
The optional second data value.
  | Resources with invalid renewability
---->{{#if:{{{data2|}}}|<!--
}}}}
------>{{#if:{{{data2name|}}}|'''{{{data2name|}}}'''<br />| }}<!--
------><sub>dec:</sub> {{{data2}}} <sub>hex:</sub> {{dec-hex|{{{data2}}} }}<!--
---->|}}<!--
-->}} }}} }}
}}<noinclude>
}}<noinclude>
==Documentation==
{{documentation}}
This template provides a uniform design for block pages.
<!-- Put categories/interwiki on the documentation page -->
<pre>
</noinclude>
{{Block
|image=
|image2=
|image3=
|invimage=
|invimage2=
|invimage3=
|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>image3</code> || Third image for three-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>invimage3</code> || Third image for three-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>{{#if:{{NAMESPACE}}||[[Category:Blocks]]}}</includeonly>