public class ProtectionEnchantment extends Enchantment
| Modifier and Type | Class and Description |
|---|---|
static class |
ProtectionEnchantment.Type |
Enchantment.Rarity| Modifier and Type | Field and Description |
|---|---|
ProtectionEnchantment.Type |
protectionType |
translationKey, type| Constructor and Description |
|---|
ProtectionEnchantment(Enchantment.Rarity weight,
ProtectionEnchantment.Type type,
EquipmentSlot[] equipmentSlot) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAccept(Enchantment other)
Returns whether this enchantment can exist on an item stack with the
other enchantment. |
int |
getMaximumLevel() |
int |
getMaximumPower(int level) |
int |
getMinimumPower(int level) |
int |
getProtectionAmount(int level,
DamageSource source) |
static double |
transformExplosionKnockback(LivingEntity entity,
double velocity) |
static int |
transformFireDuration(LivingEntity entity,
int duration) |
byRawId, canCombine, getAttackDamage, getEquipment, getMinimumLevel, getName, getOrCreateTranslationKey, getRarity, getTranslationKey, isAcceptableItem, isAvailableForEnchantedBookOffer, isAvailableForRandomSelection, isCursed, isTreasure, onTargetDamaged, onUserDamagedpublic final ProtectionEnchantment.Type protectionType
public ProtectionEnchantment(Enchantment.Rarity weight, ProtectionEnchantment.Type type, EquipmentSlot[] equipmentSlot)
public int getMinimumPower(int level)
getMinimumPower in class Enchantmentpublic int getMaximumPower(int level)
getMaximumPower in class Enchantmentpublic int getMaximumLevel()
getMaximumLevel in class Enchantmentpublic int getProtectionAmount(int level,
DamageSource source)
getProtectionAmount in class Enchantmentpublic boolean canAccept(Enchantment other)
other enchantment.canAccept in class Enchantmentpublic static int transformFireDuration(LivingEntity entity, int duration)
public static double transformExplosionKnockback(LivingEntity entity, double velocity)