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, 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 |
---|
EnchantmentProtection(int p_i45765_1_,
ResourceLocation p_i45765_2_,
int p_i45765_3_,
int p_i45765_4_) |
Modifier and Type | Method and Description |
---|---|
int |
calcModifierDamage(int level,
DamageSource source)
Calculates the damage protection of the enchantment based on level and damage source passed.
|
boolean |
canApplyTogether(Enchantment ench)
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 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.
|
addToBookList, calcDamageByCreature, canApply, canApplyAtEnchantingTable, func_181077_c, getEnchantmentById, getEnchantmentByLocation, getMinLevel, getTranslatedName, getWeight, isAllowedOnBooks, onEntityDamaged, onUserHurt, setName
public final int protectionType
public EnchantmentProtection(int p_i45765_1_, ResourceLocation p_i45765_2_, int p_i45765_3_, int p_i45765_4_)
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 int calcModifierDamage(int level, DamageSource source)
calcModifierDamage
in class Enchantment
public java.lang.String getName()
getName
in class Enchantment
public boolean canApplyTogether(Enchantment ench)
canApplyTogether
in class Enchantment
public 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_)