Template:Infobox entity: Difference between revisions

added entityid field, distinguished it from id field
replaced template with mobs template + firstver
Line 1: Line 1:
<includeonly>{{infobox common
<includeonly>{{infobox common
| title = {{#if: {{{title|}}} | {{{title}}} | {{BASEPAGENAME}} }}
| title = {{ #if: {{{title|}}} | {{{title}}} | {{BASEPAGENAME}} }}
| imagearea= {{#ifeq:{{{base|Item}}}|Item|
| imagearea = [[File: {{#ifeq: {{ucfirst: {{{image}}} }} | None | No image.png | {{#if: {{{image|}}} | {{{image}}} | {{#ifexist: File:{{BASEPAGENAME}}.png | {{BASEPAGENAME}}.png | No image.svg}} }} }}|{{ #if: {{{imagesize|}}} | {{{imagesize}}} | 200px }}|center]]{{
[[File:{{#if: {{{image|}}} | {{{image}}} | {{#ifexist: File:{{BASEPAGENAME}}.png | {{BASEPAGENAME}}.png | No image.svg}} }}|150px|center]]
   #if: {{{image2|}}} | <div style="padding-top: 1em">[[File:{{{image2}}}|{{ #if: {{{image2size|}}} | {{{image2size}}} | 200px }}|center]]</div>
{{#ifeq: {{lc: {{{invimage}}} }} | none | | {{#if: {{{invimage|}}} | <div style="padding-top: 1em; margin: 0 auto"><span style="position: relative">[[File:Grid layout None (small).png]]<span style="position:absolute; left: 2px; top: -7px">[[File:Grid {{ucfirst: {{{invimage}}} }}.png]]</span></span> | {{#ifexist: File:Grid {{BASEPAGENAME}}.png | <div style="padding-top: 1em; margin: 0 auto"><span style="position: relative">[[File:Grid layout None (small).png]]<span style="position:absolute; left: 2px; top: -7px">[[File:Grid {{ucfirst: {{BASEPAGENAME}} }}.png]]</span></span> }} }}
  }}{{
   #ifeq: {{lc: {{{invimage2}}} }} | none | | {{#if: {{{invimage2|}}} | <span style="position: relative">[[File:Grid layout None (small).png]]<span style="position:absolute; left: 2px; top: -7px">[[File:Grid {{ucfirst: {{{invimage2}}} }}.png]]</span></span> }}
  }}{{#ifeq: {{lc: {{{invimage}}} }} | none | | {{#if: {{{invimage|}}} | </div> | {{#ifexist: File:Grid {{BASEPAGENAME}}.png | </div> }} }} }}
|<!-- end Item picture code, begin Block -->
[[File:{{#if: {{{image|}}} | {{{image}}} | {{#ifexist: File:{{BASEPAGENAME}}.png | {{BASEPAGENAME}}.png | No block image.png{{!}}link=File:{{BASEPAGENAME}}.png}} }}|150px|center]]{{
  #if: {{{image2|}}} | <div style="padding-top: 1em">[[File:{{{image2}}}|150px|center]]</div>
}}{{
}}{{
   #if: {{{image3|}}} | <div style="padding-top: 1em">[[File:{{{image3}}}|150px|center]]</div>
   #if: {{{image3|}}} | <div style="padding-top: 1em">[[File:{{{image3}}}|{{ #if: {{{image3size|}}} | {{{image3size}}} | 200px }}|center]]</div>
}}{{#ifeq: {{lc: {{{invimage}}} }} | none | | {{#if: {{{invimage|}}} | <div style="padding-top: 1em; margin: 0 auto"><span style="position: relative">[[File:Grid layout None (small).png]]<span style="position:absolute; left: 2px; top: -7px">[[File:Grid {{ucfirst: {{{invimage}}} }}.png]]</span></span> | {{#ifexist: File:Grid {{BASEPAGENAME}}.png | <div style="padding-top: 1em; margin: 0 auto"><span style="position: relative">[[File:Grid layout None (small).png]]<span style="position:absolute; left: 2px; top: -7px">[[File:Grid {{ucfirst: {{BASEPAGENAME}} }}.png]]</span></span> }} }}
}}{{#if:{{{caption|}}} | <div style="text-align:center; font-size:0.9em;">{{{caption}}}</div> }}
  }}{{
  #ifeq: {{lc: {{{invimage2}}} }} | none | | {{#if: {{{invimage2|}}} | <span style="position: relative">[[File:Grid layout None (small).png]]<span style="position:absolute; left: 2px; top: -7px">[[File:Grid {{ucfirst: {{{invimage2}}} }}.png]]</span></span> }}
  }}{{
  #ifeq: {{lc: {{{invimage3}}} }} | none | | {{#if: {{{invimage3|}}} | <span style="position: relative">[[File:Grid layout None (small).png]]<span style="position:absolute; left: 2px; top: -7px">[[File:Grid {{ucfirst: {{{invimage3}}} }}.png]]</span></span> }}
  }}{{
  #ifeq: {{lc: {{{invimage4}}} }} | none | | {{#if: {{{invimage4|}}} | <span style="position: relative">[[File:Grid layout None (small).png]]<span style="position:absolute; left: 2px; top: -7px">[[File:Grid {{ucfirst: {{{invimage4}}} }}.png]]</span></span> }}
  }}{{#ifeq: {{lc: {{{invimage}}} }} | none | | {{#if: {{{invimage|}}} | </div> | {{#ifexist: File:Grid {{BASEPAGENAME}}.png | </div> }} }} }}
<!--end Block picture code and #if-->
}}
| rows =
| rows =
{{infobox row|label=Type|field={{ #if: {{{type|}}} | {{{type}}} | ? }} }}
{{infobox row|label=Health Points|field={{ #if: {{{health|}}} | {{{health}}} | ? }} }}
{{#ifeq: {{{base|Item}}} | Item
{{ #if: {{{damage|}}} | {{infobox row|label=Attack Strength|field={{{damage}}}}} }}
|
{{infobox row|label=Spawn|field={{ #if: {{{spawn|}}} | {{{spawn}}} | ? }} }}
{{infobox row|label=Durability|field={{ #if: {{{durability|}}} | {{{durability}}} | N/A }} }}
{{ #if: {{{score|}}} | {{infobox row|label=Scorepoints|field={{{score}}}}} }}
{{infobox row|label=Stackable|field={{ #if: {{{stackable|}}} | {{{stackable}}} | ? }} }}
{{#if: {{{firstver|}}} | {{infobox row|label=[[Version history|First Appearance]]|field={{{firstver}}} }} }}
{{#if: {{{data|}}} | {{infobox row|label=[[Data values|Data value]]|field={{dv|{{{data}}} }} }} }}{{#if: {{{multipledata|}}} | {{infobox row|label=[[Data values]]|field={{{multipledata}}} }} }}
<!-- end Item data fields, begin Block-->
|
{{infobox row|label=Type|field={{ #if: {{{type|}}} | {{{type}}} | ? }} }}
{{ #if: {{{transparency|}}} | {{infobox row|label=Transparency|field= {{{transparency}}} }} }}
{{
  #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 = {{ #if: {{{dirt|}}} | {{{dirt}}} | ? }}
  }} }}
}}
{{infobox row|label=Physics|field={{ #if: {{{gravity|}}} | {{{gravity}}} | ? }} }}
{{infobox row|label=[[Opacity|Transparency]]|field={{ #if: {{{transparent|}}} | {{{transparent}}} | ? }} }}
{{infobox row|label=[[Light|Luminance]]|field={{ #if: {{{light|}}} | {{{light}}} | ? }} }}
{{infobox row|label=[[Explosion#Blast_Resistance|Blast Resistance]] <sup>[{{fullurl|Template:Blast Resistance Values|action{{=}}edit|text=edit}}]</sup>|field={{ #if: {{{tntres|}}} | {{{tntres}}} | {{Blast Resistance Values | {{ #titleparts: {{PAGENAME}} | 1 | 1 }} }} }} }}
{{infobox row|label=Tool{{ #if: {{{tool2|}}} | s }}|field={{
  #switch: {{ lc: {{{tool|}}} }}
  | pick  | pickaxe  = [[File:Use-pickaxe.png|32px|link=Pickaxe]]
  | spade  | shovel  = [[File:Use-spade.png|32px|link=Shovel]]
  | axe              = [[File:Use-axe.png|32px|link=Axe]]
  | hoe              = [[File:Use-hoe.png|32px|link=Hoe]]
  | bucket | pail    = [[File:Use-bucket.png|32px|link=Bucket]]
  | sword            = [[File:Use-sword.png|32px|link=Sword]]
  | n/a    | none    = None
  | all    | alltools | any | anytool = Any tool
  | #default          = ?
}}{{
  #if: {{{tool2|}}} | {{
    #switch: {{ lc: {{{tool2}}} }}
    | pick  | pickaxe = [[File:Use-pickaxe.png|32px|link=Tools#Pickaxe|Pickaxe]]
    | spade | shovel  = [[File:Use-spade.png|32px|link=Tools#Shovel|Shovel]]
    | axe            = [[File:Use-axe.png|32px|link=Tools#Axe|Axe]]
    | hoe            = [[File:Use-hoe.png|32px|link=Tools#Hoe|Hoe]]
  }}
}} }}
{{infobox row|label=Stackable|field={{ #if: {{{stackable|}}} | {{{stackable}}} | N/A }} }}
{{
  #switch: {{ lc: {{{type|fluid}}} }}
  | fluid =
{{infobox row|label=Speed of fluid movement|field={{ #if: {{{fluidspeed|}}} | {{{fluidspeed}}} | ? }} }}
{{infobox row|label=Speed of walking through|field={{ #if: {{{movespeed|}}} | {{{movespeed}}} | ? }} }}
}}
{{#if: {{{firstver|}}} | {{infobox row|label=First Appearance|field={{{firstver}}} }} }}
{{#if: {{{firstver|}}} | {{infobox row|label=First Appearance|field={{{firstver}}} }} }}
<!--{{#if: {{{multiplevers|}}} | {{infobox row|label=First Appearances|field={{{multiplevers}}} }} }}
{{ #if: {{{id|}}} | {{infobox row|label=ID in Network Traffic (byte)|field={{{id}}}}} }}
nead confirmation to create a template for this to work-->
{{ #if: {{{entityid|}}} | {{infobox row|label=ID in Saved Games(String)|field={{{entityid}}}}} }}
{{#if: {{{data|}}} | {{infobox row|label=[[Data values|Data value]]|field={{dv|{{{data}}} }} }} }}{{#if: {{{multipledata|}}} | {{infobox row|label=[[Data values]]|field={{{multipledata}}} }} }}
{{ #if: {{{drops|}}} | {{infobox row|label=Drops|field={{{drops|}}}}} }}
<!-- end Block data fields and #if-->
}}</includeonly><noinclude>
}}
{{infobox row|label=ID in Network Traffic (byte)|field={{ #if: {{{id|}}} | {{{id}}} | ? }} }}
{{infobox row|label=ID in Saved Games (string)|field={{ #if: {{{entityid|}}} | {{{entityid}}} | ? }} }}
}}
{{#if:{{{type|}}}|[[Category:{{{type}}}{{!}}{{PAGENAME}}]]}}
</includeonly><noinclude>
{{/doc}}
{{/doc}}


[[Category:Infobox templates|I]]</noinclude>
[[Category:Infobox templates|I]]</noinclude>