Custom Enchantment Generator
BetaName your enchantment, pick the items it goes on, set its levels and costs, and add effects such as extra damage, poison on hit or more speed. The preview shows the enchanted item at each level and which levels an enchanting table can offer.
Describe it — AI writes the command
Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.
Checking the AI…
- I10–40
- II20–50
- III30–60
Blue band: what an offer of 30 levels can roll on a diamond tool. Green: levels it can land on. Weight 5 sets how often it wins against other enchantments.
Anvil: adding level III costs 12 levels from an item (6 from a book).
Your command · Java 26.3
102 characters/give @p minecraft:diamond_sword[enchantments={"my_pack:frostbite":3}]/enchant @p my_pack:frostbite 1
data/my_pack/enchantment/frostbite.json{
"anvil_cost": 4,
"description": {
"text": "Frostbite",
"color": "aqua"
},
"effects": {
"minecraft:damage": [
{
"effect": {
"type": "minecraft:add",
"value": {
"type": "minecraft:linear",
"base": 1.5,
"per_level_above_first": 1
}
},
"requirements": {
"type": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"minecraft:entity_type": "#minecraft:skeletons"
}
}
}
],
"minecraft:post_attack": [
{
"affected": "victim",
"effect": {
"type": "minecraft:apply_mob_effect",
"max_amplifier": 1,
"max_duration": {
"type": "minecraft:linear",
"base": 2,
"per_level_above_first": 1
},
"min_amplifier": 1,
"min_duration": {
"type": "minecraft:linear",
"base": 2,
"per_level_above_first": 1
},
"to_apply": "minecraft:slowness"
},
"enchanted": "attacker",
"requirements": {
"type": "minecraft:damage_source_properties",
"predicate": {
"is_direct": true
}
}
}
]
},
"max_cost": {
"base": 40,
"per_level_above_first": 10
},
"max_level": 3,
"min_cost": {
"base": 10,
"per_level_above_first": 10
},
"slots": [
"mainhand"
],
"supported_items": "#minecraft:enchantable/sword",
"weight": 5
}
data/minecraft/tags/enchantment/in_enchanting_table.json{
"values": [
"my_pack:frostbite"
]
}
data/minecraft/tags/enchantment/tradeable.json{
"values": [
"my_pack:frostbite"
]
}
- The enchanting table only offers it for primary items (or supported items when primary is empty).
- Test it: the first line gives a diamond sword with the top level; /enchant puts level I on the held item (it must be a supported item).
- Put the file in your data pack (or press Download data pack), drop the pack in your world's datapacks folder, then run /reload.
Raw editor
How it works
Since Java 1.21 enchantments are data: each one is a JSON file in data/<namespace>/enchantment/. The file says which items it fits, how many levels it has, what it costs at the enchanting table and anvil, and what it does through effect components.
{
"description": {"text": "Frostbite", "color": "aqua"},
"supported_items": "#minecraft:enchantable/sword",
"weight": 5, "max_level": 3, "anvil_cost": 4, "slots": ["mainhand"],
"min_cost": {"base": 10, "per_level_above_first": 10},
"max_cost": {"base": 40, "per_level_above_first": 10},
"effects": {"minecraft:damage": [{"effect": {"type": "minecraft:add",
"value": {"type": "minecraft:linear", "base": 1.5, "per_level_above_first": 1}}}]}
}Effects you can add
The generator uses the same effect components as vanilla enchantments: minecraft:damage (like Sharpness, optionally only against a mob or #tag, like Smite), damage_protection (Protection), knockback, attributes (Efficiency and Swift Sneak use it; any attribute such as movement speed works) and post_attack with apply_mob_effect (Bane of Arthropods’ slowness) or ignite (Fire Aspect).
Version differences
Attribute IDs lost their prefix in 1.21.2 (minecraft:generic.movement_speed became minecraft:movement_speed). 26.2 changed entity checks to "minecraft:entity_type", and 26.3 renamed condition to type inside requirements. The /give line uses enchantments={levels:{…}} up to 1.21.4 and enchantments={…} from 1.21.5.
Getting it in game
A new enchantment isn’t on the enchanting table, villagers or chest loot until it is in the right tag. Tick the boxes and the generator adds #minecraft:in_enchanting_table, #minecraft:tradeable or #minecraft:on_random_loot files. To test, run /give @p minecraft:diamond_sword[enchantments={"my_pack:frostbite":3}] or /enchant @p my_pack:frostbite 1. Custom enchantments need Java 1.21 or later; Bedrock has no data-driven enchantments.
FAQ
Why doesn't my custom enchantment show up in the enchanting table?
It must be in the #minecraft:in_enchanting_table tag (tick Enchanting table), the item must match the primary items (or supported items), and its min and max cost must overlap what the table rolls. The preview's table view shows which levels can appear.
What do min cost and max cost mean?
The enchanting table turns its level into a random power value. A level of your enchantment can be chosen when that value lands between its min and max cost. Vanilla Sharpness uses min 1 + 11 per level and max 21 + 11 per level.
Can a custom enchantment give effects like poison?
Yes. Add “Effect on hit”: it uses post_attack with apply_mob_effect, the same thing Bane of Arthropods uses for slowness, and gives the effect to the mob you hit directly.
How do I stop it from combining with Sharpness?
Put #minecraft:exclusive_set/damage in “Can't combine with”. Any enchantment or enchantment tag works there.
Does this work in 1.20 or Bedrock?
No. Enchantments became data-driven in Java 1.21, so older Java versions and Bedrock can't load custom enchantment files.