An IEnchantmentDefinition is the actual Enchantment, it does not posess a level, but you can use this to retrieve information on the Enchantment.

Importing the package

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
import crafttweaker.enchantments.IEnchantmentDefinition;

Retrieving such an object

You can retrieve such an object from the Enchantment Bracket handler or from an IEnchantment object.


ZenGetter ZenSetter Type
id string
name name string
maxLevel int
minLevel int
isAllowedOnBooks boolean
isTreasureEnchantment boolean
isCurse boolean



Checks if the enchantment can be put on the item.
First method checks in general, second checks if the item can be enchanted to this enchantment using the enchantment Table.
Both return a bool and require an IItemStack as input parameter.

ench.canApply(IItemStack item);
ench.canApplyAtEnchantmentTable(IItemStack item);


Checks what enchantability the item must have for the Enchantment at the given level.
Both methods return an int and take the level of the enchantment as int parameter.

ench.getMinEnchantability(int level);
ench.getMaxEnchantability(int level);


Returns the translated name (e.g. “smite IV”).
Returns a string and requires the level of the enchantment as int parameter.
Does the same as IEnchantment’s .displayName ZenGetter!

ench.getTranslatedName(int level);

make Enchantment

By giving an EnchantmentDefinition a level you can make an IEnchantment out of it:

ench.makeEnchantment(int level);
ench * level;


import crafttweaker.enchantments.IEnchantmentDefinition;

val array as IEnchantmentDefinition[] = [<enchantment:minecraft:protection>,<enchantment:minecraft:fire_protection>,<enchantment:minecraft:feather_falling>,<enchantment:minecraft:blast_protection>,<enchantment:minecraft:projectile_protection>,<enchantment:minecraft:respiration>,<enchantment:minecraft:aqua_affinity>];

var map as IData = {};

for ench in array {
    map += ench.makeEnchantment(3).makeTag();


recipes.addShapeless("Supo", <minecraft:golden_sword>.withTag(map), [<minecraft:iron_sword>, <minecraft:golden_sword>]);