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;
Implements
Undocumented Interfaces
IEnchantmentExtension
Members
Getter
// Enchantment.commandString as stringmyEnchantment.commandString
Return Type:
string
Getter
// Enchantment.descriptionId as stringmyEnchantment.descriptionId
Return Type:
string
descriptionId() as string
// Enchantment.descriptionId() as string;myEnchantment.descriptionId();
Return Type:
string
doPostAttack(source as LivingEntity, target as Entity, level as int)
myEnchantment.doPostAttack(myLivingEntity, myEntity, myInt);
Parameters:
doPostHurt(source as LivingEntity, target as Entity, level as int)
myEnchantment.doPostHurt(myLivingEntity, myEntity, myInt);
Parameters:
getDamageProtection(level as int, source as DamageSource) as int
myEnchantment.getDamageProtection(myInt, myDamageSource);
Parameters:
level: int
Type: int
source: DamageSource
Type: DamageSource
Return Type:
int
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 ItemStack[EquipmentSlot]
myEnchantment.getSlotItems(myLivingEntity);
Parameters:
entity: LivingEntity
Type: LivingEntity
Return Type:
ItemStack[EquipmentSlot]
isCompatibleWith(other as Enchantment) as bool
myEnchantment.isCompatibleWith(myEnchantment);
Parameters:
other: Enchantment
Type: Enchantment
Return Type:
bool
Getter
// Enchantment.isCurse as boolmyEnchantment.isCurse
Return Type:
bool
isCurse() as bool
// Enchantment.isCurse() as bool;myEnchantment.isCurse();
Return Type:
bool
Getter
// Enchantment.isDiscoverable as boolmyEnchantment.isDiscoverable
Return Type:
bool
isDiscoverable() as bool
// Enchantment.isDiscoverable() as bool;myEnchantment.isDiscoverable();
Return Type:
bool
Getter
// Enchantment.isTradeable as boolmyEnchantment.isTradeable
Return Type:
bool
isTradeable() as bool
// Enchantment.isTradeable() as bool;myEnchantment.isTradeable();
Return Type:
bool
Getter
// Enchantment.isTreasureOnly as boolmyEnchantment.isTreasureOnly
Return Type:
bool
isTreasureOnly() as bool
// Enchantment.isTreasureOnly() as bool;myEnchantment.isTreasureOnly();
Return Type:
bool
Getter
// Enchantment.maxLevel as intmyEnchantment.maxLevel
Return Type:
int
maxLevel() as int
// Enchantment.maxLevel() as int;myEnchantment.maxLevel();
Return Type:
int
Getter
// Enchantment.minLevel as intmyEnchantment.minLevel
Return Type:
int
minLevel() as int
// Enchantment.minLevel() as int;myEnchantment.minLevel();
Return Type:
int
Getter
// Enchantment.registryName as ResourceLocationmyEnchantment.registryName
Return Type:
ResourceLocation
registryName() as ResourceLocation