An IEnchantment essentially is an IEnchantmentDefinition and an enchantment level.

Импорт пакета

Link to импорт-пакета

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.IEnchantment;

Геттеры/сеттеры

Link to геттерысеттеры

ZenGetterZenSetterТип
ZenGetter
definition
ZenSetter
Тип
IEnchantmentDefinition
ZenGetter
level
ZenSetter
Тип
int
ZenGetter
displayName
ZenSetter
displayName
Тип
string

Получить чары в формате NBT

Link to получить-чары-в-формате-nbt

You might want to get the Enchantment's NBT-Tag.
You can either cast it as IData or use the method:

ZenScript
Copy
ench.makeTag();
ench as crafttweaker.data.IData;