# Custom items

RageMode allows you to create, append and give custom items that can be used in RageMode GUIs or for rewarding players. These items can contain enchantments, custom model data, flags, potion, book, banner and all item meta related components.

### Examples

You need to manually edit the configuration `custom-items.yml` file to create an item.

<pre class="language-yml"><code class="lang-yml">my-firework:
<strong>  item: firework_rocket
</strong>  firework:
    power: 2
    one: # Section name, can be anything
      type: star
      flicker: true
      trail: true
      colors:
        primary:
        - 155,242,174,247
        fade:
        - 72,248,107,51
</code></pre>

This will creates a firework rocket with power 2, pre-configured colours, type, flicker and trail option as well. You can mix types, colours with this firework, just create another section with a different name.

```yml
unique_pickaxe:
  item: diamond_pickaxe
  display-name: <dark_green>Pickaxe
  quantity: 1
  unbreakable: true
  lore:
  - <aqua>This pickaxe is unbreakable
  - <green>Use it wisely!
  enchantments:
  - efficiency:3
```

This will creates a diamond pickaxe item with a unique display name, lore, unbreakable state and efficiency level 3 enchantment.

***

Once you created the item, you can use this anywhere within the plugin where custom items are allowed and specify the name `my-firework` for firework or `unique_pickaxe` for diamond pickaxe to append this item.

### Meta types to create different items

If you have a small knowledge about item meta, refer to [ItemMeta](https://jd.papermc.io/paper/1.21.11/org/bukkit/inventory/meta/ItemMeta.html) docs page to learn what an item can contain.

These are the options you can use in an item when creating one:

* `item` - Select a [material](https://jd.papermc.io/paper/org/bukkit/Material.html)
* `display-name` - The text that appears for this item
* `lore` - List of lore text
* `custom-plugin-item` - Apply a custom [supported plugin](/ragemode-docs/getting-started.md#dependencies) item
  * ```yml
    name:
      custom-plugin-item: nameOfItem
    ```
* `item-flags` - List of item flags to apply
  * ```yml
    name:
      item-flags:
      - hide_enchants
      - hide_attributes
    ```
* `quantity` - Quantity amount of this item
  * ```yml
    name:
      quantity: 2
    ```
* `unbreakable` - Sets unbreakable state for this item
  * ```yml
    name:
      unbreakable: true
    ```
* `enchantments` - List of enchantments with levels to apply
  * ```yml
    name:
      enchantments:
      - knockback:2
      - unbreaking:2
    ```
* `firework` - Only meant for firework rocket item
  * ```yml
    name:
      item: firework_rocket
      power: 2
      first:
        type: ball
        flicker: false
        trail: true
        colors:
          primary:
          - red
          fade:
          - 61,271
      second:
        type: star
        flicker: true
        trail: true
        colors:
          primary:
          - green
          fade:
          - 49,287,65
          - blue
    ```
* `color` - Only for leather items, <https://minecraft.wiki/w/Data_component_format#dyed_color>
  * ```yml
    name:
      item: leather_leggings
      color: 225
    ```
* `effects` - Potion only item
  * ```yml
    name:
      item: potion
      effects:
      - regeneration amplifier=1 duration=120 particles=true ambient=true icon=true
      - speed duration=60 icon=true
    ```
  * ```yml
    name:
      item: potion
      data:
        base-type: healing
        color: ''
        effects:
        - regeneration amplifier=2 duration=140
        - resistance particles=false
    ```
* `banner-patterns` - <https://minecraft.wiki/w/Data_component_format#banner_patterns>
  * <pre class="language-yml"><code class="lang-yml"><strong>name:
    </strong><strong>  item: white_banner
    </strong>  banner-patterns:
      - red diagonal_right
      - black stripe_downleft
    </code></pre>
* `max-stack` - The [maximum stack](https://minecraft.wiki/w/Item#Stacking) of an item
  * ```yml
    name:
      item: snowball
      max-stack: 8
    ```
* `item-name` - [Item name](https://jd.papermc.io/paper/org/bukkit/inventory/meta/ItemMeta.html#itemName\(\))
  * ```yml
    name:
      item: iron_sword
      item-name: ironed sword
    ```
* `use-remainder` - See [wiki](https://minecraft.wiki/w/Data_component_format#use_remainder)
  * ```yml
    name:
      item: iron_axe
      use-remainder: gunpowder
    ```
* `durability` - Sets the damage of the item
  * ```yml
    name:
      item: stone_sword
      durability: -1
    ```
* `max-damage` - Sets the maximum amount of damage of this item
  * ```yml
    name:
      item: iron_shovel
      max-damage: 0
    ```
* `custom-model-data` - (Legacy) - Sets a custom model data
  * ```yml
    name:
      item: diamond
      custom-model-data: 45321
    ```
* `custom-model-data-component` - Sets a custom model data component
  * ```yml
    name:
      item: diamond
      custom-model-data-component:
        colors:
        - red,green
        strings:
        - xx
        flags:
        - true
        floats:
        - 4
    ```
* `shield-color` - Sets the colour of the shield item
  * ```yml
    name:
      item: shield
      shield-color: orange
    ```
* `skull.texture-url` - Sets a texture for the skull item, specify an UUID of a registered player
  * ```yml
    name:
      item: player_head
      skull:
        texture-url: 61d644761f706d31c99a593c8d5f7cbbd4372d73fbee8464f482fa6c139d97d4
    ```
* `potion-duration-scale` - Sets a potion duration scale value for the potion, <https://minecraft.wiki/w/Data_component_format#potion_duration_scale>
  * ```yml
    name:
      item: potion
      potion-duration-scale: -1
    ```
* `enchantment-storage-meta` - Sets inactive [enchantments storage](https://minecraft.wiki/w/Data_component_format#stored_enchantments) for the item
  * ```yml
    name:
      item: iron_pickaxe
      enchantment-storage-meta:
      - unbreaking:2
    ```
* `book`  - Book item configurations
  * ```yml
    name:
      item: writable_book
      book:
        title: "<gray>Title"
        generation: original
        author: yourName
        pages:
        - text
        - text2
    ```
* `trim` - [Trim](https://minecraft.wiki/w/Data_component_format#trim) configurations for armours
  * ```yml
    name:
      item: leather_leggings
      trim:
        material: emerald
        pattern: host
    ```
* `bundle-contents` - Add custom items to [bundle](https://minecraft.wiki/w/Data_component_format#bundle_contents)
  * ```yml
    name:
      item: bundle
      bundle-contents:
      - itemName
      - customItemName
    ```
* `glint-override` - Applies glint (glowing) effect
  * ```yml
    name:
      item: stone
      glint-override: true
    ```
* `glider` - Allows players to [glide](https://minecraft.wiki/w/Data_component_format#glider) (as with [elytra](https://minecraft.wiki/w/Elytra)) when equipped
  * ```yml
    name:
      item: elytra
      glider: false
    ```
* `enchantable` - Allows this item to be [enchantable](https://minecraft.wiki/w/Data_component_format#enchantable) in an enchanting table
  * ```yml
    name:
      item: elytra
      enchantable: 15
    ```
* `repair-cost` - <https://minecraft.wiki/w/Data_component_format#repair_cost>
  * ```yml
    name:
      item: iron_axe
      repair-cost: -1
    ```
* `hide-tooltip` - Hides [tooltip](https://minecraft.wiki/w/Data_component_format#tooltip_display) from the item
  * ```yml
    name:
      item: chest
      hide-tooltip: true
    ```
  * ```yml
    name:
      item: chest
      hide-tooltip:
      - minecraft:enchantments
    ```
* `tooltip-style` - Sets a custom [tooltip style](https://minecraft.wiki/w/Data_component_format#tooltip_style)
  * ```yml
    name:
      item: diamond
      tooltip-style: id
    ```
* `item-model` - Sets a custom [item model](https://minecraft.wiki/w/Data_component_format#item_model)
  * ```yml
    name:
      item: emerald
      item-model: diamond
    ```
* `rarity` - Sets the [rarity](https://minecraft.wiki/w/Rarity) of this item, which affects the default colour of its name
  * ```yml
    name:
      item: iron_sword
      rarity: epic
    ```
* `food-component` - <https://minecraft.wiki/w/Data_component_format#food>
  * ```yml
    name:
      item: steak
      food-component:
        always-eat: false
        nutrition: 0
        saturation: 0
    ```
* `jukebox-song` - <https://minecraft.wiki/w/Data_component_format#jukebox_playable>
  * ```yml
    name:
      item: jukebox
      jukebox-song: pigstep
    ```
* `music-instrument` - <https://minecraft.wiki/w/Data_component_format#instrument>
  * ```yml
    name:
      item: goat_horn
      music-instrument: feel_goat_horn
    ```
* `break-song` - <https://minecraft.wiki/w/Data_component_format#break_sound>
  * ```yml
    name:
      item: diamond_sword
      break-song: item.wolf_armor.break
    ```
* `attributes` - <https://minecraft.wiki/w/Data_component_format#attribute_modifiers>
  * ```yml
    name:
      item: iron_axe
      attributes:
        attack_damage:
          operation: add_number
          equipment-slot: hand
          amount: 0.0
          name: ""
        attack_knockback:
          operation: add_number
          equipment-slot: hand
          amount: 1.0
          name: ""
    ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mdswork.gitbook.io/ragemode-docs/guides/custom-items.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
