Enchantment
Importing the class
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.Enchantment;Members
Getter
// Enchantment.anvilCost as intmyEnchantment.anvilCost
Return Type:
int
canEnchant(stack as IItemStack) as bool
myEnchantment.canEnchant(myIItemStack);Parameters:
stack: IItemStack Type: IItemStack
Return Type:
bool
Getter
// Enchantment.commandString as stringmyEnchantment.commandString
Return Type:
string
Getter
// Enchantment.definition as EnchantmentDefinitionmyEnchantment.definition
Return Type:
EnchantmentDefinition
Getter
myEnchantment.exclusiveSet
Return Type:
Enchantment[]
getMaxCost(level as int) as int
// Enchantment.getMaxCost(level as int) as int;myEnchantment.getMaxCost(myInt);Parameters:
level: int Type: int
Return Type:
int
getMinCost(level as int) as int
// Enchantment.getMinCost(level as int) as int;myEnchantment.getMinCost(myInt);Parameters:
level: int Type: int
Return Type:
int
getSlotItems(entity as LivingEntity) as IItemStack[EquipmentSlot]
myEnchantment.getSlotItems(myLivingEntity);Parameters:
entity: LivingEntity Type: LivingEntity
Return Type:
IItemStack[EquipmentSlot]
isPrimaryItem(stack as IItemStack) as bool
myEnchantment.isPrimaryItem(myIItemStack);Parameters:
stack: IItemStack Type: IItemStack
Return Type:
bool
isSupportedItem(stack as IItemStack) as bool
myEnchantment.isSupportedItem(myIItemStack);Parameters:
stack: IItemStack Type: IItemStack
Return Type:
bool
matchingSlot(slot as EquipmentSlot) as bool
myEnchantment.matchingSlot(myEquipmentSlot);Parameters:
slot: EquipmentSlot Type: EquipmentSlot
Return Type:
bool
Getter
// Enchantment.maxLevel as intmyEnchantment.maxLevel
Return Type:
int
Getter
// Enchantment.minLevel as intmyEnchantment.minLevel
Return Type:
int
Getter
// Enchantment.registryName as ResourceLocationmyEnchantment.registryName
Return Type:
ResourceLocation
Getter
myEnchantment.supportedItems
Return Type:
ItemDefinition[]
Getter
// Enchantment.weight as intmyEnchantment.weight
Return Type:
int