Template:Item: Difference between revisions

Template page
StardustLabs>Tera458
No edit summary
m (1 revision imported)
Line 1: Line 1:
{{#seo:|image=File:{{#if:{{{pageimage|}}}|{{{pageimage}}}|{{PAGENAME}}.png}}}}
<span class="icon-minecraft icon-minecraft-{{{item|{{{1|grass_block}}}}}}"></span><templatestyles src="Template:Item/styles.css"/><noinclude>{{/doc}}</noinclude>
{{#invoke:infobox|infobox
| defaultimagesize = 160px
| rows =
{{infobox row|label='''Base item'''|field={{#if: {{{baseitem|}}} | <span class="plainlinks">[https://minecraft.wiki/w/{{{baseitem}}} {{{baseitem}}}]</span> | ? }} }}
{{#if: {{{durability|}}} | {{infobox row|label='''<span class="plainlinks">[https://minecraft.wiki/w/Durability Durability]</span>'''|field={{{durability|}}} }} }}
{{#if: {{{baseenchants|}}} | {{infobox row|label='''<span class="plainlinks">[https://minecraft.wiki/w/Enchanting Base enchants]</span>'''|field={{{baseenchants|}}} }} }}
{{#if: {{{attack damage|}}} | {{infobox row|label='''<span class="plainlinks">[https://minecraft.wiki/w/Damage Attack damage]</span>'''|field={{{attack damage|}}} }} }}
{{#if: {{{attack speed|}}} | {{infobox row|label='''<span class="plainlinks">[https://minecraft.wiki/w/Damage#Attack_cooldown Attack speed]</span>'''|field={{{attack speed|}}} }} }}
{{#if: {{{dps|}}} | {{infobox row|label='''<span class="plainlinks">[https://minecraft.wiki/w/Damage#Attack_cooldown DPS]</span>'''|field={{{dps|}}} }} }}
{{#if: {{{armor|}}} | {{infobox row|label='''<span class="plainlinks">[https://minecraft.wiki/w/Armor Armor]</span>'''|field={{{armor|}}} }} }}
{{#if: {{{effects|}}} | {{infobox row|label='''<span class="plainlinks">[https://minecraft.wiki/w/Effect Effects]</span>'''|field={{{effects|}}} }} }}
{{#if: {{{attributes|}}} | {{infobox row|label='''<span class="plainlinks">[https://minecraft.wiki/w/Attribute Attribute modifiers]</span>'''|field={{{attributes|}}} }} }}
{{#if: {{{command|}}} | {{infobox row|label='''Command'''|field=<div style="max-height:100px; overflow-y: scroll; border: 1px solid #ccc; padding: 5px; max-width:200px; word-wrap: break-word">{{{command|}}}</div>}} }}
{{#if: {{{notes|}}} | {{infobox row|label='''Notes'''|field={{{notes|}}} }} }}
}}<noinclude>
<templatedata>
{
"params": {
"baseitem": {
"description": "What is the base item of the custom item (auto links to the Minecraft Wiki)",
"example": "Diamond sword",
"required": true
},
"attack damage": {
"description": "Average damage the weapon can inflict on strike if a weapon",
"example": "{{hp|9}}",
"suggested": true
},
"attack speed": {
"description": "Average attack speed if a weapon",
"example": "2",
"suggested": true
},
"command": {
"description": "Command to obtain the item",
"example": "/loot give @s loot starmute:artifact/blazing_hatchet",
"default": "/loot give @s",
"autovalue": "/loot give @s",
"required": true
},
"armor": {
"description": "Armor added by the item if an armor",
"example": "{{Armor|5}}",
"suggested": true
},
"notes": {
"description": "Additional notes about the item"
},
"effects": {
"description": "Effects of the item if it's a potion",
"example": "{{EffectLink|Haste|Haste I}} (2:00)<br>{{EffectLink|Strength|Strength II}} (2:00)",
"suggested": true
},
"baseenchants": {
"description": "Enchants that comes with the item, keep empty if there is none.",
"example": "Mending<br>Power II",
"autovalue": "",
"suggested": true
},
"durability": {
"description": "Indicates the item durability, keep empty if there is none.",
"example": "465",
"suggested": true
},
"image": {
"description": "Forces an image not based on the title of the page, useful for putting a GIF. You can also create a diaporama by putting \";\" between the images names."
},
"image2": {
"description": "Adds a second image under the first one. You can also create a diaporama by putting \";\" between the images names."
},
"pageimage": {
"description": "Forced .png or .gif set to appear for the page popup and SEO. Obligatory if \" ; \" is used in the \"image\" string."
},
"dps": {},
"attributes": {}
},
"description": "Displays an infobox with basic info about an item.",
"paramOrder": [
"image",
"pageimage",
"image2",
"baseitem",
"durability",
"baseenchants",
"attack damage",
"attack speed",
"dps",
"armor",
"effects",
"attributes",
"command",
"notes"
]
}
</templatedata></noinclude>

Revision as of 00:26, 23 May 2024

Page Template:Item/styles.css has no content.

Template documentation[view][edit][history][purge]
This documentation is transcluded from Template:Item/doc. Changes can be proposed in the talk page.

{{Item}} displays a Minecraft inventory icon for the material/item ID specified. The supported items list is taken from GamerGeeks.net and only recognizes items by their technical ID in the game.

Current items

https://www.prismparty.net/hosted/images/items/icons-minecraft.webp

Template data

Display an inventory icon for the material/item ID specified.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Item1

The material ID to display the item for

Default
grass_block
Example
carrot_on_a_stick
Stringrequired