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.
Implements
Undocumented Interfaces
IEnchantmentExtension
Members
Getter
Return Type:
string
Getter
Return Type:
string
descriptionId() as string
Return Type:
string
doPostAttack(source as LivingEntity, target as Entity, level as int)
Parameters:
doPostHurt(source as LivingEntity, target as Entity, level as int)
Parameters:
getDamageProtection(level as int, source as DamageSource) as int
Parameters:
level: int
Type: int
source: DamageSource
Type: DamageSource
Return Type:
int
getFullname(level as int) as Component
Parameters:
level: int
Type: int
Return Type:
Component
getMaxCost(level as int) as int
Parameters:
level: int
Type: int
Return Type:
int
getMinCost(level as int) as int
Parameters:
level: int
Type: int
Return Type:
int
getSlotItems(entity as LivingEntity) as ItemStack[EquipmentSlot]
Parameters:
entity: LivingEntity
Type: LivingEntity
Return Type:
ItemStack[EquipmentSlot]
isCompatibleWith(other as Enchantment) as bool
Parameters:
other: Enchantment
Type: Enchantment
Return Type:
bool
Getter
Return Type:
bool
isCurse() as bool
Return Type:
bool
Getter
Return Type:
bool
isDiscoverable() as bool
Return Type:
bool
Getter
Return Type:
bool
isTradeable() as bool
Return Type:
bool
Getter
Return Type:
bool
isTreasureOnly() as bool
Return Type:
bool
Getter
Return Type:
int
maxLevel() as int
Return Type:
int
Getter
Return Type:
int
minLevel() as int
Return Type:
int
Getter
Return Type:
ResourceLocation
registryName() as ResourceLocation
Return Type:
ResourceLocation