Create custom Enchantments

Create custom Enchantments for the Powered Enchanting Data Pack.

Note that you need to know commands and functions to use this generator. If you just want to submit an idea for a new Enchantment, follow this link.

  1. Define the name of the Data Pack ID and select the Minecraft version you want to use for the Data Pack.
  2. Go to the first dark gray section, which contains all text fields for the first Enchantment, and fill them in.
    • If you want to add more then one Enchantment, you can add one by clicking on the according button in the navigation bar or by using the key combination Ctrl + Enter.
    • Navigate quickly between all Enchantments by using the buttons in the left sidebar.
  3. To download the finished Data Pack you can, again, use the button in the navigation bar or the key combination Ctrl + S.
  4. Create the remaining Commands and functions to execute the Enchantment on the tool, weapon or armor.
    How to use the built-in functions, like detection of tool usage or multiple durability drain, you can find here:

    Get some additional tips




Data Pack ID Name

Select your Minecraft version





Close

Name of the Enchantment

Id of the Enchantment

Max Level of the Enchantment:

Tools or Armor, the enchantment can be enchanted on (separate with space)

Incompatible Enchantment Ids (separate with space)

Chance that an Enchantment shows in the Selection for Enchanting

Additional tips

The tick.mcfunction in the function directory is executed every tick and the load.mcfunction is executed on reload. The function tags to do this are in the main pack and you don't need to create them again.

Detect if item has Enchantment

After the Item has been enchanted, it will have the Enchantment ID saved in the NBT data.
You can either use a predicate to detect it:
{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "equipment": {
      "mainhand": {
        "nbt": "{PoweredEnchantments:[{id:\"minecraft:ENCHANTMENT\"}]}"
      }
    }
  }
}

Or a command:
execute if entity @s[nbt={SelectedItem:{tag:{PoweredEnchantments:[{id:"minecraft:ENCHANTMENT"}]}}}]

The Level of the enchantment is stored like vanilla items:
{id:"minecraft:ENCHANTMENT", lvl:5s}

Detect the usage of a tool

The main pack of Powered Enchanting contains four predicates which check for the usage of tools:

  • With powerench_main:tools/pickaxe you can detect the usage of all Pickaxes
  • With powerench_main:tools/axe you can detect the usage of all Axes
  • With powerench_main:tools/shovel you can detect the usage of all Shovels
  • With powerench_main:tools/seeds you can detect the mining of seeds

Drain multiple durability points

When the following function is executed, it drains a durability point from the selected item in the hotbar:

function powerench_main:durability

Change max level of vanilla Enchantment

Execute this command in the function which will be executed on reload:

scoreboard players set #protection powerench 5

The ID after the # is the ID of the Enchantment and the number at the end defines the new max level.