Template:Infobox block: Difference between revisions
Simplify default logic |
No edit summary |
||
| (18 intermediate revisions by 8 users not shown) | |||
| Line 1: | Line 1: | ||
{{#invoke:infobox|infobox | |||
| invimage = title | | 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={{{renewable}}} }} }} | {{#if: {{{renewable|}}} | {{infobox row|label=[[minecraft:Renewable resource|Renewable]]|field={{{renewable}}} }} }} | ||
{{#if: {{{stackable|}}} | {{infobox row|label=Stackable|field={{{stackable}}} {{#if: {{{maxStack|}}} | ({{{maxStack}}}) }} }} |<!-- {{{stackable}}} not provided => --->{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing stackability}}}} }} | {{#if: {{{stackable|}}} | {{infobox row|label=Stackable|field={{{stackable}}} {{#if: {{{maxStack|}}} | ({{{maxStack}}}) }} }} |<!-- {{{stackable}}} not provided => --->{{#if: {{NAMESPACE}} || {{translation category|project=0|Missing stackability}}}} }} | ||
{{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|class=pixel-image|field= | {{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|class=pixel-image|field={{{tool|}}}{{ | ||
#if: {{{tool2|}}} | {{{tool2|}}} | |||
}}{{ | }}{{ | ||
#if: {{{tool3|}}} | {{{tool3|}}} | |||
#if: {{{tool3|}}} | | |||
}} }} | }} }} | ||
{{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|Luminous]]|field={{ #if: {{{light|}}} | {{{light}}} {{#if: {{{lightLevel|}}} | ({{{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|}}} | ({{{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 [ | {{ #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 75: | Line 32: | ||
| Resources with invalid renewability | | Resources with invalid renewability | ||
}}}} | }}}} | ||
}} | }}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
<!-- Put categories/interwiki on the documentation page --> | <!-- Put categories/interwiki on the documentation page --> | ||
</noinclude> | </noinclude> | ||