public class EnchantmentProtection extends Enchantment
| Modifier and Type | Class and Description |
|---|---|
static class |
EnchantmentProtection.Type |
Enchantment.RarityIForgeRegistryEntry.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, typedelegate| 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, getEnchantmentByID, getEnchantmentByLocation, getEnchantmentID, getEntityEquipment, getMinLevel, getRarity, getTranslatedName, isAllowedOnBooks, isCompatibleWith, isCurse, isTreasureEnchantment, onEntityDamaged, onUserHurt, registerEnchantments, setNamegetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNamepublic final EnchantmentProtection.Type protectionType
public EnchantmentProtection(Enchantment.Rarity rarityIn, EnchantmentProtection.Type protectionTypeIn, EntityEquipmentSlot... slots)
public int getMinEnchantability(int enchantmentLevel)
getMinEnchantability in class Enchantmentpublic int getMaxEnchantability(int enchantmentLevel)
getMaxEnchantability in class Enchantmentpublic int getMaxLevel()
getMaxLevel in class Enchantmentpublic int calcModifierDamage(int level,
DamageSource source)
calcModifierDamage in class Enchantmentpublic java.lang.String getName()
getName in class Enchantmentpublic boolean canApplyTogether(Enchantment ench)
canApplyTogether in class Enchantmentpublic static int getFireTimeForEntity(EntityLivingBase p_92093_0_, int p_92093_1_)
public static double getBlastDamageReduction(EntityLivingBase entityLivingBaseIn, double damage)