wiki:olivine/dsl/types/item

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
nametextCustom name of the item
descriptiontextThe lore of the item (that's just a fancy name for a custom description of the item)
enchantmentslist of enchantmentThe list of enchantments the item should have
colorcolorColor of the item, only applies to leather armor right now
modifiersitem modifiersItem-specific modifiers, click the item modifiers link for more information
wearintegerHow 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 said
  • stability - Knockback resistance
  • agility - Movement / run speed
  • strength - 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 }
    }
}
Last modified 4 years ago Last modified on May 25, 2020 7:04:33 PM