Wiki 9Minecraft Wiki 9Minecraft

Custom Item Enchantments (`minecraft:enchantable`)

Allow custom tools, weapons, and armor to receive vanilla enchantments at tables and anvils.

6Sections
3Code examples
4Known errors

By default, custom items in Minecraft Bedrock cannot be enchanted at an enchanting table, combined with enchanted books on an anvil, or targeted by the `/enchant` command. To opt a custom item into the vanilla enchantment system, you apply the `minecraft:enchantable` item component. While Bedrock does not currently have a native JSON registry for creating entirely new enchantment types, you can pair this component with the Script API to read and manipulate enchantments dynamically.

The `minecraft:enchantable` Component

The `minecraft:enchantable` component defines two things for your item: which group of vanilla enchantments it is allowed to receive, and how generous the enchanting table should be when rolling enchantments for it. You place this component directly inside the `components` object of your behavior pack item JSON.

For an item to behave properly with durability-based enchantments like Unbreaking or Mending, it must also include the `minecraft:max_damage` and `minecraft:durability` components, and have its `minecraft:max_stack_size` set to `1`. Enchanting stackable items causes unexpected behavior in survival inventories.

FieldTypeWhat it does
slotStringDetermines which pool of vanilla enchantments can be applied to the item at an enchanting table or anvil.
valueIntegerThe enchantability score of the item. Higher values increase the chance of getting higher-level and multiple enchantments at an enchanting table. Must be at least 1 to work at a table.
BP/items/ruby_sword.json
{
  "format_version": "1.20.80",
  "minecraft:item": {
    "description": {
      "identifier": "my_pack:ruby_sword",
      "menu_category": {
        "category": "equipment",
        "group": "itemGroup.name.sword"
      }
    },
    "components": {
      "minecraft:max_stack_size": 1,
      "minecraft:hand_equipped": true,
      "minecraft:durability": {
        "max_durability": 850
      },
      "minecraft:damage": {
        "value": 7
      },
      "minecraft:enchantable": {
        "slot": "sword",
        "value": 14
      },
      "minecraft:icon": "ruby_sword"
    }
  }
}

Valid Enchantment Slots

The `slot` property restricts which enchantments the game considers valid for your item. When a player places the item on an enchanting table or combines it with a book on an anvil, Bedrock checks the enchantment's internal target against the string you provide here.

Regardless of which specific slot you pick, any item with a valid `minecraft:enchantable` component and durability can also receive universal anvil enchantments such as Unbreaking, Mending, and Curse of Vanishing. If you set `value` to `0`, the item cannot be enchanted at an enchanting table, though it will still accept valid books on an anvil and work with the `/enchant` command.

Slot IdentifierMatching Vanilla EnchantmentsTypical Use
swordSharpness, Smite, Bane of Arthropods, Knockback, Fire Aspect, LootingMelee weapons
pickaxeEfficiency, Silk Touch, FortuneMining tools
axeEfficiency, Silk Touch, Fortune, Sharpness, Smite, Bane of ArthropodsChopping tools and heavy weapons
shovelEfficiency, Silk Touch, FortuneDigging tools
hoeEfficiency, Silk Touch, FortuneFarming tools
bowPower, Punch, Flame, InfinityRanged bow weapons
crossbowQuick Charge, Multishot, PiercingCrossbow weapons
fishing_rodLuck of the Sea, LureFishing rods
armor_headProtection, Fire Protection, Blast Protection, Projectile Protection, Thorns, Respiration, Aqua AffinityHelmets and headgear
armor_torsoProtection, Fire Protection, Blast Protection, Projectile Protection, ThornsChestplates
armor_legsProtection, Fire Protection, Blast Protection, Projectile Protection, Thorns, Swift SneakLeggings
armor_feetProtection, Fire Protection, Blast Protection, Projectile Protection, Thorns, Feather Falling, Depth Strider, Frost Walker, Soul SpeedBoots
elytraUnbreaking, Mending, Curse of Binding, Curse of VanishingGliders and back-slot items
cosmetic_headCurse of Binding, Curse of VanishingMasks, carved pumpkins, and mob heads
flintsteelUnbreaking, Mending, Curse of VanishingUtility items with durability that should not get tool enchants
shearsEfficiency, Unbreaking, MendingShearing and harvesting tools
shieldUnbreaking, Mending, Curse of VanishingOff-hand defensive items
spearImpaling, Loyalty, Riptide, ChannelingTrident-style weapons

Enchantability Values for Balance

The `value` integer controls the weight modifier used when the enchanting table calculates modified enchantment levels. If you want your custom tier to feel consistent with vanilla equipment, match your `value` to the closest vanilla material tier.

A low number like `5` (Stone) means even a level 30 enchanting setup will frequently yield modest enchantments. A high number like `22` (Gold) or `15` (Netherite) makes it much easier for players to roll top-tier combinations like Sharpness IV and Looting III on a single table roll.

Vanilla Material TierTools & Weapons ValueArmor Value
Wood / Leather1515
Stone / Chainmail512
Iron / Turtle149
Diamond1010
Netherite1515
Gold2225

Controlling Enchantment Glint

When an item receives at least one enchantment, Bedrock automatically renders the scrolling purple foil texture over its icon. You can also force an unenchanted item to display this shimmer—or control it separately—using the `minecraft:glint` component.

In format versions 1.20.60 and later, `minecraft:glint` accepts either a simple boolean or an object containing a `value` boolean. Setting it to `true` makes the item always glow like an enchanted golden apple, even when no enchantments are present on the item stack.

BP/items/blessed_amulet.json
{
  "format_version": "1.20.80",
  "minecraft:item": {
    "description": {
      "identifier": "my_pack:blessed_amulet"
    },
    "components": {
      "minecraft:max_stack_size": 1,
      "minecraft:glint": true,
      "minecraft:icon": "blessed_amulet"
    }
  }
}

Reading and Adding Enchantments via Script API

To inspect or modify enchantments on an item stack at runtime, use the `minecraft:enchantable` item component from `@minecraft/server`. This is the standard way to award pre-enchanted custom gear from quests, or to check if a player's custom tool has a specific enchantment before running custom gameplay logic.

Note that the Script API can only apply enchantments that are legal for the item's `slot` as defined in its JSON file, and the enchantment level must stay within the vanilla minimum and maximum bounds (for example, `1` to `5` for Sharpness). Always write the modified `ItemStack` back to the container slot after changing its enchantments, because `getItem()` returns a copy rather than a live reference.

BP/scripts/enchant_helper.js
import { world, EquipmentSlot, EnchantmentType } from "@minecraft/server";

export function applyFireAspectToMainhand(player) {
  const equippable = player.getComponent("minecraft:equippable");
  if (!equippable) return;

  const itemStack = equippable.getEquipment(EquipmentSlot.Mainhand);
  if (!itemStack) return;

  const enchantable = itemStack.getComponent("minecraft:enchantable");
  if (!enchantable) return;

  const fireAspect = new EnchantmentType("fire_aspect");
  const enchantment = { type: fireAspect, level: 2 };

  if (enchantable.canAddEnchantment(enchantment)) {
    enchantable.addEnchantment(enchantment);
    equippable.setEquipment(EquipmentSlot.Mainhand, itemStack);
  }
}

Simulating Custom Enchantments

Bedrock Edition does not currently support defining brand-new enchantment identifiers in behavior pack JSON. If your add-on requires custom enchantments—such as "Vampirism I" or "Auto-Smelt"—the standard approach is to store custom data on the `ItemStack` using dynamic properties and display the enchantment name using item lore.

When you attach lore and a dynamic property via script, you can also keep a dummy `minecraft:enchantable` component on the item so players can still apply Unbreaking or Mending at an anvil alongside your scripted effect.

Which versions this applies to

Applies to format_version 1.20.50 and higher (including 1.21.x). Both the `minecraft:enchantable` JSON component and the `@minecraft/server` `ItemEnchantableComponent` API are stable and do not require any experimental toggles.

When it does not work

What you seeWhyThe fix
Content Log Error: `[Item][error]-my_pack:ruby_sword | minecraft:enchantable | unrecognized enchantable slot`You used an invalid string in the `slot` field, such as `"helmet"`, `"chestplate"`, or `"trident"` instead of the internal Bedrock slot names.Replace the slot name with a valid identifier from the table above: use `"armor_head"`, `"armor_torso"`, `"armor_legs"`, `"armor_feet"`, or `"spear"` (for tridents).
Item can be enchanted with `/enchant` or an anvil book, but shows no options when placed inside an enchanting table.The `value` field inside `minecraft:enchantable` is set to `0` or omitted, or the item's `minecraft:max_stack_size` is greater than `1`.Set `value` to an integer of `1` or higher (for example, `10`), and ensure `"minecraft:max_stack_size": 1` is present in your item components.
Enchantments added via `enchantable.addEnchantment()` in Script API do not appear on the player's item in-game.Inventory and equipment methods like `getItem()` and `getEquipment()` return a clone of the `ItemStack`. Modifying the component only mutates the in-memory copy.Call `container.setItem(slot, itemStack)` or `equippable.setEquipment(EquipmentSlot.Mainhand, itemStack)` after modifying `enchantable` to save the updated item back to the player.
Efficiency on a custom pickaxe or axe does not actually increase block breaking speed.For Efficiency to scale mining speed on a custom tool, the item must also have a `minecraft:digger` component configured for the blocks being mined, or make use of the standard item tags (`minecraft:is_pickaxe`, `minecraft:is_axe`, etc.) in 1.20.60+.Add the matching `minecraft:is_pickaxe` (or equivalent tool tag) to `minecraft:tags` and configure `minecraft:digger` so the engine knows which blocks your tool accelerates.

Reference, straight from the game files

Read out of the game itself, so the ids match the version you are building for.