If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
import crafttweaker . api.item.enchantment . EnchantmentCategory;
Undocumented Interfaces IExtensibleEnum
, Comparable <Enum >
EnchantmentCategory is an enum with 14 constants. They are accessible like so:
// EnchantmentCategory.ARMOR
< constant : minecraft:enchantment/category:armor >
// EnchantmentCategory.ARMOR_CHEST
< constant : minecraft:enchantment/category:armor_chest >
// EnchantmentCategory.ARMOR_FEET
< constant : minecraft:enchantment/category:armor_feet >
// EnchantmentCategory.ARMOR_HEAD
< constant : minecraft:enchantment/category:armor_head >
// EnchantmentCategory.ARMOR_LEGS
< constant : minecraft:enchantment/category:armor_legs >
// EnchantmentCategory.BOW
< constant : minecraft:enchantment/category:bow >
// EnchantmentCategory.BREAKABLE
< constant : minecraft:enchantment/category:breakable >
// EnchantmentCategory.CROSSBOW
< constant : minecraft:enchantment/category:crossbow >
// EnchantmentCategory.DIGGER
< constant : minecraft:enchantment/category:digger >
// EnchantmentCategory.FISHING_ROD
< constant : minecraft:enchantment/category:fishing_rod >
// EnchantmentCategory.TRIDENT
< constant : minecraft:enchantment/category:trident >
// EnchantmentCategory.VANISHABLE
< constant : minecraft:enchantment/category:vanishable >
// EnchantmentCategory.WEAPON
< constant : minecraft:enchantment/category:weapon >
// EnchantmentCategory.WEARABLE
< constant : minecraft:enchantment/category:wearable >
// EnchantmentCategory.canEnchant(item as Item) as bool;
< constant : minecraft:enchantment/category:armor > .canEnchant(myItem);
Return Type:
bool