Minecraft Wiki
m (remove parameter 4)
m (adding span titles for notes and availability)
Line 20: Line 20:
 
| enchantments only = #99CC00
 
| enchantments only = #99CC00
 
| upcoming = orange
 
| upcoming = orange
| planned = #24DCB3
+
| #default =
  +
}}
  +
}}{{
  +
#vardefine: availabilityTitle|{{
  +
#switch: {{lc: {{{obtain|}}} }}
  +
| none = Cannot be obtained no matter what. May be able to be placed using /setblock.
  +
| give = Cannot be legitimately obtained. Only available using the /give command or via inventory editors.
  +
| creative = Available in Creative mode by item list.
  +
| pick block = Available in Creative mode by block picking.
  +
| trading = Can be obtained by trading with villagers or in Creative mode.
  +
| enchantments = Only available by having Enchanted tools or in Creative mode.
  +
| enchantments only = Only available by having Enchanted tools or via use of the /give command or inventory editors in Creative mode, but unobtainable in the Creative mode menu.
  +
| upcoming = Available in an update yet to be released
 
| #default =
 
| #default =
 
}}
 
}}
Line 50: Line 62:
 
|[[File:{{{icon|{{#var: DvName}}.png}}}|{{{iconsize|25px}}}]] }} }} }}
 
|[[File:{{{icon|{{#var: DvName}}.png}}}|{{{iconsize|25px}}}]] }} }} }}
 
| {{
 
| {{
#if: {{#var: availability|}}| <span style='color:{{#var: availability}};'> }}{{
+
#if: {{#var: availability|}}| <span style='color:{{#var: availability}};' {{
  +
#if: {{#var: availabilityTitle}}| title="{{#var: availabilityTitle}}" }}> }}{{
 
#vardefineecho:datavalue| {{{dv|{{#expr: {{#var: datavalue|-1}} + 1}}}}} }}{{
 
#vardefineecho:datavalue| {{{dv|{{#expr: {{#var: datavalue|-1}} + 1}}}}} }}{{
 
#if: {{#var: availability|}}| </span> }}
 
#if: {{#var: availability|}}| </span> }}
 
| {{
 
| {{
#if: {{#var: availability|}}| <span style='color:{{#var: availability}};'> }}{{
+
#if: {{#var: availability|}}| <span style='color:{{#var: availability}};' {{
  +
#if: {{#var: availabilityTitle}}| title="{{#var: availabilityTitle}}" }}> }}{{
 
dec-hex|{{
 
dec-hex|{{
 
#var:datavalue}}}}{{
 
#var:datavalue}}}}{{
Line 81: Line 95:
 
#vardefine:datasection|Data values}}}}<sup>{{
 
#vardefine:datasection|Data values}}}}<sup>{{
 
#if: {{#pos:{{{2|}}}|D}}
 
#if: {{#pos:{{{2|}}}|D}}
| [[Item durability|D]] }} {{
+
| <span title="Use the item's Damage field to define its durability.">[[Item durability|D]]</span> }} {{
 
#if: {{#pos:{{{2|}}}|I}}
 
#if: {{#pos:{{{2|}}}|I}}
| [[{{#var:datasection}}#Item IDs|I]] }} {{
+
| <span title="Has a separate ID as an inventory item.">[[{{#var:datasection}}#Item IDs|I]]</span> }} {{
 
#if: {{#pos:{{{2|}}}|S}}
 
#if: {{#pos:{{{2|}}}|S}}
  +
| <span title="Requires additional data from the saved game's Data array to fully define the block.">[[{{
| [[{{#var:datasection}}#{{{section|{{#var: DvName}}}}}|S]] }} {{
+
#var:datasection}}#{{{section|{{#var: DvName}}}}}|S]]</span> }} {{
 
#if: {{#pos:{{{2|}}}|B}}
 
#if: {{#pos:{{{2|}}}|B}}
  +
| <span title="Requires additional data in the item's Damage field to fully define the inventory item.">[[{{
| [[{{#var:datasection}}#{{{section|{{#var: DvName}}}}}|B]] }} {{
+
#var:datasection}}#{{{section|{{#var: DvName}}}}}|B]]</span> }} {{
 
#if: {{#pos:{{{2|}}}|E}}
 
#if: {{#pos:{{{2|}}}|E}}
| [[Block entity|E]] }}</sup>}}<!--
+
| <span title="Requires a block entity to store additional data.">[[Block entity|E]]</span> }}</sup>}}<!--
   
 
Foot
 
Foot

Revision as of 22:23, 26 August 2014

[view | edit | history | purge]Documentation

This template is used to create the tables on Data values.

Parameters

Unnamed paremeters
  • |1=: The name of the block, defaults to "unused". A suffix can be added using parentheses after the name.
  • |2=: Optional notes. Type the letter(s) corresponding to the note(s) you want to add it.
    • I: Has a separate ID as an inventory item.
    • D: Use the item's Damage field to define its durability.
    • S: Requires additional data from the saved game's Data array to fully define the block.
    • B: Requires additional data in the item's Damage field to fully define the inventory item.
    • N: Requires additional data in the item's NBT data to fully define the inventory item.
    • E: Requires a block entity to store additional data.
  • |3=: Optional prefix
Named parameters
  • |obtain=: Limitations on obtaining. Defaults to any. Values include:
    • give: Only available using /give.
    • none: Cannot be obtained no matter what. May be placed using /setblock.
    • creative: Available in creative mode by item list.
    • pick block: Available in creative mode by block picking.
    • trading: Can be obtained by trading with villagers or in creative mode.
    • enchantments: Only available by having enchanted tools or in creative mode.
    • enchantments only: Only available by having enchanted tools or via use of /give, but unobtainable in the creative mode menu.
  • |icon=: Name of the icon, including the .png. If |sprite= is set, then the name of the sprite. Defaults to |1=.
  • |iconsize=: Size of the icon, defaults to 25px.
  • |nameid=: Change the nameid to something other than |1=.
  • |link=: Link to a different article than |1=.
  • |section=: Set the section in data values to something other than |1=.
Table parameters
  • |dv=: Sets the data value. Defaults to the previous plus 1.
  • |sprite=: If set, the icon uses the sprite template listed instead of a file. Setting it causes all later templates to use the same option. To reset to use a files, set it to be empty.
  • |table=: Sets the header title for the template and all following uses. Defaults to Blocks.
  • |namecolumn=: If set to 0 then all following uses of the template will have no name column. To use the name column again later simply set it back to 1.
  • |foot=: If set, then it adds the foot to the table.
  • |bedrock=: If set to 1, all following uses of the template will have the availability tooltips will be more reflective of the Bedrock Edition, and the name column will be hidden. Simply set to 0 to switch back to Java Edition.

Example

{{Data table|Air|icon=none|obtain=none}}
{{Data table|Stone|SB}}
{{Data table|Grass Block|nameid=grass|icon=Grass.png}}
{{Data table|Dirt|SB}}
{{Data table|Cobblestone}}
{{Data table|Wood Planks|SB|icon=Oak Planks.png}}
{{Data table|Sapling|SB}}
{{Data table|Bedrock|obtain=creative}}
{{Data table|Water|S|section=Water and Lava|nameid=flowing_water|obtain=none}}
{{Data table|Water|S|Stationary|section=Water and Lava|obtain=none}}
{{Data table|Lava|S|section=Water and Lava|nameid=flowing_water|obtain=none}}
{{Data table|Lava (stationary)|S|section=Water and Lava|obtain=none}}
{{Data table|Sand|SB}}
{{Data table|Gravel}}
{{Data table|Gold Ore}}
{{Data table|Iron Ore|foot=1}}
Icon Dec Hex Name Block
0 0 minecraft:air Air
Stone 1 1 minecraft:stone Stone S B
Grass Block 2 2 minecraft:grass Grass Block
Dirt 3 3 minecraft:dirt Dirt S B
Cobblestone 4 4 minecraft:cobblestone Cobblestone
Oak Planks 5 5 minecraft:wood_planks Wood Planks S B
Sapling 6 6 minecraft:sapling Sapling S B
Bedrock 7 7 minecraft:bedrock Bedrock
Water 8 8 minecraft:flowing_water Water S
Water 9 9 minecraft:water Stationary Water S
Lava 10 A minecraft:flowing_water Lava S
Lava 11 B minecraft:lava Lava (stationary) S
Sand 12 C minecraft:sand Sand S B
Gravel 13 D minecraft:gravel Gravel
Gold Ore 14 E minecraft:gold_ore Gold Ore
Iron Ore 15 F minecraft:iron_ore Iron Ore

See also

[view | edit | history | purge]The above documentation is transcluded from Template:Data table/doc.