public class EnchantmentProtection extends Enchantment
Modifier and Type | Class and Description |
---|---|
static class |
EnchantmentProtection.Type |
Enchantment.Rarity
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
EnchantmentProtection.Type |
protectionType
Defines the type of protection of the enchantment, 0 = all, 1 = fire, 2 = fall (feather fall), 3 = explosion and
4 = projectile.
|
name, REGISTRY, type
delegate
Constructor and Description |
---|
EnchantmentProtection(Enchantment.Rarity rarityIn,
EnchantmentProtection.Type protectionTypeIn,
EntityEquipmentSlot... slots) |
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 |
getBlastDamageReduction(EntityLivingBase entityLivingBaseIn,
double damage) |
static int |
getFireTimeForEntity(EntityLivingBase 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.
|
calcDamageByCreature, canApply, canApplyAtEnchantingTable, func_191560_c, getEnchantmentByID, getEnchantmentByLocation, getEnchantmentID, getEntityEquipment, getMinLevel, getRarity, getTranslatedName, isAllowedOnBooks, isCurse, isTreasureEnchantment, onEntityDamaged, onUserHurt, registerEnchantments, setName
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
public final EnchantmentProtection.Type protectionType
public EnchantmentProtection(Enchantment.Rarity rarityIn, EnchantmentProtection.Type protectionTypeIn, EntityEquipmentSlot... slots)
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(EntityLivingBase p_92093_0_, int p_92093_1_)
public static double getBlastDamageReduction(EntityLivingBase entityLivingBaseIn, double damage)