public class EnchantmentDamage extends Enchantment
Modifier and Type | Field and Description |
---|---|
int |
damageType
Defines the type of damage of the enchantment, 0 = all, 1 = undead, 3 = arthropods
|
aquaAffinity, baneOfArthropods, blastProtection, depthStrider, effectId, efficiency, enchantmentsBookList, featherFalling, fireAspect, fireProtection, flame, fortune, infinity, knockback, looting, luckOfTheSea, lure, name, power, projectileProtection, protection, punch, respiration, sharpness, silkTouch, smite, thorns, type, unbreaking
Constructor and Description |
---|
EnchantmentDamage(int enchID,
ResourceLocation enchName,
int enchWeight,
int classification) |
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.
|
addToBookList, calcModifierDamage, canApplyAtEnchantingTable, func_181077_c, getEnchantmentById, getEnchantmentByLocation, getMinLevel, getTranslatedName, getWeight, isAllowedOnBooks, onUserHurt, setName
public final int damageType
public EnchantmentDamage(int enchID, ResourceLocation enchName, int enchWeight, int classification)
public int getMinEnchantability(int enchantmentLevel)
getMinEnchantability
in class Enchantment
public int getMaxEnchantability(int enchantmentLevel)
getMaxEnchantability
in class Enchantment
public int getMaxLevel()
getMaxLevel
in class Enchantment
public float calcDamageByCreature(int level, EnumCreatureAttribute creatureType)
calcDamageByCreature
in class Enchantment
public java.lang.String getName()
getName
in class Enchantment
public boolean canApplyTogether(Enchantment ench)
canApplyTogether
in class Enchantment
public boolean canApply(ItemStack stack)
canApply
in class Enchantment
public void onEntityDamaged(EntityLivingBase user, Entity target, int level)
onEntityDamaged
in class Enchantment