IEnchantment
Link to ienchantment
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;
ZenGetters/ZenSetters
Link to zengetterszensetters
ZenGetter | ZenSetter | 类型 |
---|---|---|
ZenGetter definition | ZenSetter | 类型 IEnchantmentDefinition |
ZenGetter level | ZenSetter | 类型 int |
ZenGetter displayName | ZenSetter displayName | 类型 string |
ZenMethods
Link to zenmethods
Retrieve the Enchantment as NBT
Link to retrieve-the-enchantment-as-nbt
You might want to get the Enchantment's NBT-Tag.
You can either cast it as IData or use the method:
ZenScript Copyench.makeTag();
ench as crafttweaker.data.IData;