Skip to main content

🧩 Components

Overview​

Components define modern vanilla item behavior in Oraxen, such as food values, durability, equipping, stack size, cooldowns, and custom tooltip or model settings.

tip

Couldn't find the component you need? Oraxen supports all vanilla and custom components. Learn more here.

Configuration​

Components are configured per item in .yml files inside the plugins/Oraxen/items directory.

  • 📁 plugins
    • 📁 Oraxen
      • 📁 items
        • 📄 weapons.yml
        • 📄 foods.yml
my_item:
material: PAPER
components:
max_stack_size: 2

Components​

đŸ“Ļ max_stack_size

Sets the maximum stack size of the item.

myitem:
components:
max_stack_size: 64

Range
1 to 99

Minecraft version
1.20.5+

🌟 enchantment_glint_override

Overrides the enchantment glint of an item.

myitem:
components:
enchantment_glint_override: true

Fields
true - Forces glint to appear.
false - Forces glint to disappear, even when the item is enchanted.

Minecraft version
1.20.5+

đŸ”Ĩ fire_resistant

Makes the item immune to fire and lava damage when dropped.

myitem:
components:
fire_resistant: true

Minecraft version
1.20.5+

💀 death_protection

Prevents death when the item is consumed and applies configured death effects.

myitem:
components:
death_protection:
death_effects:
- apply_effects:
effects:
- type: REGENERATION
duration: 5
amplifier: 1
- remove_effects:
effects:
- POISON
- play_sound: true
- teleport_randomly: true

When triggered, the component prevents the player's death and applies the configured effects. Supported death effects include applying potion effects, removing effects, clearing all effects, teleporting randomly, and playing the death protection sound.

myitem:
components:
death_protection:
death_effects:
- clear_all_effects: true
- play_sound: true

Minecraft version
1.21.2+

Fields
death_effects configures the effects applied after preventing death.

🙈 hide_tooltip

Hides the item's tooltip entirely.

myitem:
components:
hide_tooltip: true

Minecraft version
1.20.5+

🔨 durability

Defines custom durability behavior for the item.

myitem:
components:
durability:
value: 250
damage_block_break: true
damage_entity_hit: true

Minecraft version
1.20.5+

Fields
value sets the durability value and must be at least 1.
damage_block_break and damage_entity_hit are booleans and default to false. Set them to true explicitly to enable durability damage.

Shorthand
An integer value works as shorthand for the section form.

myitem:
components:
durability: 250
info

On modern versions, this replaces the legacy durability mechanic for item durability configuration.

🍖 food

Makes the item behave like food and defines how much hunger and saturation it restores.

myitem:
components:
food:
nutrition: 6
saturation: 7.2
can_always_eat: false

Minecraft version
1.20.5+

Fields
nutrition sets the hunger restored and must be at least 0.
saturation sets the saturation restored and must be at least 0.
can_always_eat allows the item to be consumed even when the player is full and defaults to false.

info

On 1.20.5+, prefer this component over the legacy food mechanic.

đŸĨ¤ consumable

Controls how the item is consumed, including timing, animation, particles, and sound.

myitem:
components:
consumable:
consume_seconds: 1.6
animation: "eat"
sound: "entity.generic.eat"
has_consume_particles: true

Minecraft version
1.21.2+

Fields
consume_seconds is the consumption time in seconds and defaults to 1.6.
animation defines the use animation.
sound defines the consume sound.
has_consume_particles controls whether consume particles are shown and defaults to true.
on_consume_effects is a list of effects applied on consumption. Each entry has a type of apply_effects, remove_effects, clear_all_effects, teleport_randomly, or play_sound.

myitem:
components:
consumable:
on_consume_effects:
- type: apply_effects
effects:
minecraft:haste:
duration: 3600
amplifier: 0
probability: 1.0
info

Valid sound keys use Minecraft sound resource locations, such as entity.generic.eat or item.honey_bottle.drink.

đŸ›Ąī¸ equippable

Makes the item equippable and defines slot-related behavior.

myitem:
components:
equippable:
slot: HEAD
model: "oraxen:my_helmet"
equip_sound: "item.armor.equip_diamond"
dispensable: true
swappable: true
damage_on_hurt: true
camera_overlay: "oraxen:textures/misc/pumpkinblur.png"

Minecraft version
1.21.2+

Fields
slot is required and defines the equipment slot.
model defines the model resource location.
equip_sound defines the equip sound.
dispensable, swappable, and damage_on_hurt default to true.
camera_overlay defines the overlay texture.
allowed_entity_types is a list of entity type names allowed to wear the item.

Slot groups

  • HAND
  • OFF_HAND
  • FEET
  • LEGS
  • CHEST
  • HEAD
  • BODY
  • SADDLE
info

On 1.21.2+, this replaces older behaviors such as the legacy hat mechanic for wearable items.

â›ī¸ tool

Defines tool mining behavior, including default speed and optional mining rules.

myitem:
components:
tool:
damage_per_block: 1
default_mining_speed: 4.0
rules:
- tag: "minecraft:mineable/pickaxe"
speed: 8.0
correct_for_drops: true

Minecraft version
1.20.6+

Fields
damage_per_block sets the durability damage dealt per block and defaults to 1.
default_mining_speed sets the mining speed and defaults to 1.0.
rules defines optional mining rules. Each rule targets blocks with material, materials, tag, or tags, and sets speed and correct_for_drops.

âąī¸ use_cooldown

Adds a cooldown after using the item.

myitem:
components:
use_cooldown:
seconds: 2.5
group: "magic_wands"

Minecraft version
1.21.2+

Fields
seconds sets the cooldown duration in seconds, must be at least 0, and defaults to 1.0.
group defines the shared cooldown group and defaults to oraxen:<item_id>.

đŸĒŖ use_remainder

Defines which item remains after the item is consumed or used up.

myitem:
components:
use_remainder:
minecraft_type: "BOWL"
amount: 1
myitem:
components:
use_remainder:
oraxen_item: "empty_bottle"
amount: 1

Minecraft version
1.21.2+

Fields
oraxen_item, minecraft_type, crucible_item, mmoitems_id, mmoitems_type, and ecoitem_id define the item that is returned.
minecraft_item accepts a serialized ItemStack.
amount sets how many of that item remain and defaults to 1.

đŸŽĩ jukebox_playable

Makes the item playable in jukeboxes.

myitem:
components:
jukebox_playable:
show_in_tooltip: true
song_key: "oraxen:my_song"

Minecraft version
1.21+

Fields
show_in_tooltip controls whether the song appears in the tooltip. When the section is present and the key is omitted, it is treated as false and the tooltip line is hidden.
song_key is the namespaced song key.

Format
song_key should be a namespaced key such as minecraft:cat or oraxen:my_song.

info

On 1.21+, prefer this component over the deprecated legacy music_disc mechanic.

đŸ’Ŧ tooltip_style

Sets a custom tooltip style resource location.

myitem:
components:
tooltip_style: "oraxen:epic_tooltip"

Minecraft version
1.21.2+

đŸ–ŧī¸ item_model

Sets a custom item model resource location through the component system.

myitem:
components:
item_model: "oraxen:weapons/flame_blade"

Minecraft version
1.21.2+

➕ generic

Allows you to use Minecraft components that are not specifically handled by Oraxen. Only components written as a YAML section are passed through. Scalar or list values, such as enchantable: 15 or glider: true, are silently skipped.

myitem:
components:
repairable:
items:
- minecraft:diamond
myitem:
components:
custom_component:
some_property: value
another_property: 123

A full list of all supported components can be found here.

Minecraft version
1.21.3+

đŸžī¸ painting_variant

Sets the painting variant of the item when placed.

myitem:
components:
painting_variant: "oraxen:edna"
info

The item has to be of the PAINTING material for this to work.

Minecraft version
1.21.5+

Example​

myitem:
itemname: "<gold>Traveler's Meal"
material: BREAD
components:
max_stack_size: 16
fire_resistant: false
food:
nutrition: 8
saturation: 9.6
can_always_eat: true
consumable:
consume_seconds: 1.6
animation: "eat"
sound: "entity.generic.eat"
has_consume_particles: true
use_remainder:
minecraft_type: "BOWL"
amount: 1
use_cooldown:
seconds: 1.0
group: "food_items"
tooltip_style: "oraxen:food/meal"
item_model: "oraxen:food/travelers_meal"