Game Items
Important: Visit core types for information on primitive and core types such as integer
and visit qualified references for how to express item identification before you continue here.
An item
expresses a named game item using a qualified reference. The syntax takes the form item reference
.
Examples
item &foo:potion\`awesome sauce`
Attributes
You can also tack-on attributes to your item definition, the syntax is either item &group:name with attributes
or item &name with attributes
where attributes is described as a dictionary in the table below:
Name | Type | Description |
---|---|---|
name | text | Custom name of the item |
description | text | The lore of the item (that's just a fancy name for a custom description of the item) |
enchantments | list of enchantment | The list of enchantments the item should have |
color | color | Color of the item, only applies to leather armor right now |
modifiers | item modifiers | Item-specific modifiers, click the item modifiers link for more information |
wear | integer | How worn the item is, this isn't how damaged it is but how much it costs to repair it when it becomes damaged |
Item Modifiers
All these are modifier definitions, click on the link for information on how to define one. These modifiers affect the mob or player holding this item in their hand.
health
- 'nuff saidstability
- Knockback resistanceagility
- Movement / run speedstrength
- Attack damage dealt
Examples
Here's an item with attributes including enchantments and a modifier:
item &mmm:darksteel_leggings with { name -> "Me pants!" description -> "Git yer own pants! these be mine!" enchantments -> [ { type -> fire_protection; level -> 3 } { type -> unbreaking; level -> 3 } ] modifiers -> { health -> { amount -> 2; operator -> boost } } }