public class EnchantmentDamage extends Enchantment
Enchantment.RarityIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
int |
damageType
Defines the type of damage of the enchantment, 0 = all, 1 = undead, 3 = arthropods
|
name, REGISTRY, typedelegate| Constructor and Description |
|---|
EnchantmentDamage(Enchantment.Rarity rarityIn,
int damageTypeIn,
EntityEquipmentSlot... slots) |
| Modifier and Type | Method and Description |
|---|---|
float |
calcDamageByCreature(int level,
EnumCreatureAttribute creatureType)
Calculates the additional damage that will be dealt by an item with this enchantment.
|
boolean |
canApply(ItemStack stack)
Determines if this enchantment can be applied to a specific ItemStack.
|
boolean |
canApplyTogether(Enchantment ench)
Determines if the enchantment passed can be applyied together with this enchantment.
|
int |
getMaxEnchantability(int enchantmentLevel)
Returns the maximum value of enchantability nedded on the enchantment level passed.
|
int |
getMaxLevel()
Returns the maximum level that the enchantment can have.
|
int |
getMinEnchantability(int enchantmentLevel)
Returns the minimal value of enchantability needed on the enchantment level passed.
|
java.lang.String |
getName()
Return the name of key in translation table of this enchantment.
|
void |
onEntityDamaged(EntityLivingBase user,
Entity target,
int level)
Called whenever a mob is damaged with an item that has this enchantment on it.
|
calcModifierDamage, canApplyAtEnchantingTable, func_191560_c, getEnchantmentByID, getEnchantmentByLocation, getEnchantmentID, getEntityEquipment, getMinLevel, getRarity, getTranslatedName, isAllowedOnBooks, isCurse, isTreasureEnchantment, onUserHurt, registerEnchantments, setNamegetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNamepublic final int damageType
public EnchantmentDamage(Enchantment.Rarity rarityIn, int damageTypeIn, EntityEquipmentSlot... slots)
public int getMinEnchantability(int enchantmentLevel)
getMinEnchantability in class Enchantmentpublic int getMaxEnchantability(int enchantmentLevel)
getMaxEnchantability in class Enchantmentpublic int getMaxLevel()
getMaxLevel in class Enchantmentpublic float calcDamageByCreature(int level,
EnumCreatureAttribute creatureType)
calcDamageByCreature in class Enchantmentpublic java.lang.String getName()
getName in class Enchantmentpublic boolean canApplyTogether(Enchantment ench)
canApplyTogether in class Enchantmentpublic boolean canApply(ItemStack stack)
canApply in class Enchantmentpublic void onEntityDamaged(EntityLivingBase user, Entity target, int level)
onEntityDamaged in class Enchantment