public class EnchantmentDurability extends Enchantment
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
Modifier | Constructor and Description |
---|---|
protected |
EnchantmentDurability(int enchID,
ResourceLocation enchName,
int enchWeight) |
Modifier and Type | Method and Description |
---|---|
boolean |
canApply(ItemStack stack)
Determines if this enchantment can be applied to a specific ItemStack.
|
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.
|
static boolean |
negateDamage(ItemStack p_92097_0_,
int p_92097_1_,
java.util.Random p_92097_2_)
Used by ItemStack.attemptDamageItem.
|
addToBookList, calcDamageByCreature, calcModifierDamage, canApplyAtEnchantingTable, canApplyTogether, func_181077_c, getEnchantmentById, getEnchantmentByLocation, getMinLevel, getName, getTranslatedName, getWeight, isAllowedOnBooks, onEntityDamaged, onUserHurt, setName
protected EnchantmentDurability(int enchID, ResourceLocation enchName, int enchWeight)
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 boolean canApply(ItemStack stack)
canApply
in class Enchantment
public static boolean negateDamage(ItemStack p_92097_0_, int p_92097_1_, java.util.Random p_92097_2_)