Difference between revisions of "Template:Default item tags"

From Mine Blocks Wiki
Jump to navigation Jump to search
If you find a typo, inconsistency, or error, please sign up and help out the wiki! We can't do it without your help! :D Thank you!

 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>
+
{{Main|[[Data tags]]}}
 +
{| class='wikitable'
 +
! Name
 +
! Description
 +
|-
 +
! <code>name</code>
 +
| style="font-style: italic;"| {{{name|String}}}
 +
Renames the item.
 +
|-
 +
! <code>enchantments</code>
 +
| style="font-style: italic;"| {{{enchantments|Array of Strings}}}
 +
Enchants the item (see [[Enchanting#Commands|enchanting]]).
 +
|-
 +
! <code>anvilUses</code>
 +
| style="font-style: italic;"| {{{anvil-uses|Integer}}}
 +
Number of times an anvil was used on the item.
 +
|}<noinclude>
 
A template for the default [[data tags]] available for items, such as the item's <code>name</code>.
 
A template for the default [[data tags]] available for items, such as the item's <code>name</code>.
  
 
While not every items needs to display data tags,  
 
While not every items needs to display data tags,  
 +
 +
== Syntax ==
 +
<pre><nowiki>
 +
{{Default item tags
 +
| name =
 +
| enchanting =
 +
| anvil-uses =
 +
}}
 +
</nowiki></pre>
  
 
== Usage ==
 
== Usage ==
 
Place the template in a two-column table with the columns "name" and "description". It's recommended to put the item's unique data tags at the top, and the default template at the bottom of the table.
 
Place the template in a two-column table with the columns "name" and "description". It's recommended to put the item's unique data tags at the top, and the default template at the bottom of the table.
  
<nowiki>''Main article: [[Data tags]]''
+
<pre><nowiki>
 
+
{{Default item tags}}
{| class='wikitable'
+
</nowiki></pre>
|'''Name'''
 
|'''Description'''
 
{{default item tags}}
 
|}</nowiki>
 
  
 
The result of the above code is displayed below:
 
The result of the above code is displayed below:
 
+
{{Default item tags}}
== Template ==
 
''Main article: [[Data tags]]''
 
 
 
{| class='wikitable'
 
|'''Name'''
 
|'''Description'''
 
</noinclude>
 
|-
 
|<code>name</code>
 
|''String''
 
Renames the item.
 
|-
 
|<code>enchantments</code>
 
|''Array of Strings''
 
Enchants the item (see [[Enchanting#Commands|enchanting]]).
 
|-
 
|<code>anvilUses</code>
 
|''Integer''
 
Number of times an anvil was used on the item.
 
<noinclude>
 
|}
 
 
</noinclude>
 
</noinclude>

Latest revision as of 09:37, 22 December 2021

Main article: Data tags
Name Description
name String

Renames the item.

enchantments Array of Strings

Enchants the item (see enchanting).

anvilUses Integer

Number of times an anvil was used on the item.

A template for the default data tags available for items, such as the item's name.

While not every items needs to display data tags,

Syntax

{{Default item tags
| name = 
| enchanting = 
| anvil-uses = 
}}

Usage

Place the template in a two-column table with the columns "name" and "description". It's recommended to put the item's unique data tags at the top, and the default template at the bottom of the table.

{{Default item tags}}

The result of the above code is displayed below:

Main article: Data tags
Name Description
name String

Renames the item.

enchantments Array of Strings

Enchants the item (see enchanting).

anvilUses Integer

Number of times an anvil was used on the item.