Items

This page explains how to define custom items in YAML format.


Example

compressed_coal:
  type: coal
  amount: 1
  name: "&8Compressed Coal"
  lore:
    - "&7A dense chunk of coal, ready for use."
  model-data: 1003
  damage: 0
  repair-cost: 10
  flags:
    - hide enchants
  unbreakable: false
  enchants:
    smite: 1
  attributes:
    - knockback_resistance 0.2 operation=multiply slot=chest name=stability

Options

type

  • Description: The base Minecraft material.

  • Example: coal, diamond_sword, iron_ingot.

amount

  • Description: Stack size of the item.

  • Default: 1

name

  • Description: Custom display name. Supports Minecraft color codes (&).

  • Example: &8Compressed Coal

lore

  • Description: List of lore lines shown under the item name. Supports color codes.

  • Example:

    lore:
      - "&7A dense chunk of coal, ready for use."

model-data

  • Description: Custom model data value for use with resource packs.

  • Example: 1003

damage

  • Description: The item’s durability damage.

  • Default: 0

repair-cost

  • Description: Repair cost in an anvil.

  • Example: 10

flags

unbreakable

  • Description: Whether the item is unbreakable.

  • Default: false

enchants

attributes

  • Description: List of custom attribute modifiers.

  • Format:

    <attribute> <value> operation=<operation> slot=<slot> name=<uniqueName>
  • Operations:

    ADD → Adds a flat value.
    PERCENT → Increments the base value.
    MULTIPLY → Multiplies the base value.
  • Example:

    attributes:
      - knockback_resistance 0.2 operation=multiply slot=chest name=stability