public class EnchantmentProtection extends Enchantment
| Modifier and Type | Field and Description |
|---|---|
int |
protectionType
Defines the type of protection of the enchantment, 0 = all, 1 = fire, 2 = fall (feather fall), 3 = explosion and
4 = projectile.
|
aquaAffinity, baneOfArthropods, blastProtection, effectId, efficiency, enchantmentsBookList, enchantmentsList, featherFalling, field_151369_A, field_151370_z, fireAspect, fireProtection, flame, fortune, infinity, knockback, looting, name, power, projectileProtection, protection, punch, respiration, sharpness, silkTouch, smite, thorns, type, unbreaking| Constructor and Description |
|---|
EnchantmentProtection(int p_i1936_1_,
int p_i1936_2_,
int p_i1936_3_) |
| Modifier and Type | Method and Description |
|---|---|
int |
calcModifierDamage(int p_77318_1_,
DamageSource p_77318_2_)
Calculates de damage protection of the enchantment based on level and damage source passed.
|
boolean |
canApplyTogether(Enchantment p_77326_1_)
Determines if the enchantment passed can be applyied together with this enchantment.
|
static double |
func_92092_a(Entity p_92092_0_,
double p_92092_1_) |
static int |
getFireTimeForEntity(Entity p_92093_0_,
int p_92093_1_)
Gets the amount of ticks an entity should be set fire, adjusted for fire protection.
|
int |
getMaxEnchantability(int p_77317_1_)
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 p_77321_1_)
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.
|
addToBookList, canApply, canApplyAtEnchantingTable, func_151367_b, func_151368_a, func_152376_a, getMinLevel, getTranslatedName, getWeight, isAllowedOnBooks, setNamepublic final int protectionType
public EnchantmentProtection(int p_i1936_1_,
int p_i1936_2_,
int p_i1936_3_)
public int getMinEnchantability(int p_77321_1_)
getMinEnchantability in class Enchantmentpublic int getMaxEnchantability(int p_77317_1_)
getMaxEnchantability in class Enchantmentpublic int getMaxLevel()
getMaxLevel in class Enchantmentpublic int calcModifierDamage(int p_77318_1_,
DamageSource p_77318_2_)
calcModifierDamage in class Enchantmentpublic java.lang.String getName()
getName in class Enchantmentpublic boolean canApplyTogether(Enchantment p_77326_1_)
canApplyTogether in class Enchantmentpublic static int getFireTimeForEntity(Entity p_92093_0_, int p_92093_1_)
public static double func_92092_a(Entity p_92092_0_, double p_92092_1_)