Package net.minecraft.enchantment
Class ProtectionEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.ProtectionEnchantment
public class ProtectionEnchantment extends Enchantment
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProtectionEnchantment.TypeNested classes/interfaces inherited from class net.minecraft.enchantment.Enchantment
Enchantment.Rarity -
Field Summary
Fields Modifier and Type Field Description ProtectionEnchantment.TypeprotectionTypeFields inherited from class net.minecraft.enchantment.Enchantment
translationKey, type -
Constructor Summary
Constructors Constructor Description ProtectionEnchantment(Enchantment.Rarity weight, ProtectionEnchantment.Type type, EquipmentSlot[] equipmentSlot) -
Method Summary
Modifier and Type Method Description booleancanAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.intgetMaxLevel()intgetMaxPower(int level)intgetMinPower(int level)intgetProtectionAmount(int level, DamageSource source)static doubletransformExplosionKnockback(LivingEntity entity, double velocity)static inttransformFireDuration(LivingEntity entity, int duration)Methods inherited from class net.minecraft.enchantment.Enchantment
byRawId, canCombine, getAttackDamage, getEquipment, getMinLevel, getName, getOrCreateTranslationKey, getRarity, getTranslationKey, isAcceptableItem, isAvailableForEnchantedBookOffer, isAvailableForRandomSelection, isCursed, isTreasure, onTargetDamaged, onUserDamaged
-
Field Details
-
protectionType
-
-
Constructor Details
-
ProtectionEnchantment
public ProtectionEnchantment(Enchantment.Rarity weight, ProtectionEnchantment.Type type, EquipmentSlot[] equipmentSlot)
-
-
Method Details
-
getMinPower
public int getMinPower(int level)- Overrides:
getMinPowerin classEnchantment
-
getMaxPower
public int getMaxPower(int level)- Overrides:
getMaxPowerin classEnchantment
-
getMaxLevel
public int getMaxLevel()- Overrides:
getMaxLevelin classEnchantment
-
getProtectionAmount
- Overrides:
getProtectionAmountin classEnchantment
-
canAccept
Returns whether this enchantment can exist on an item stack with theotherenchantment.- Overrides:
canAcceptin classEnchantment
-
transformFireDuration
-
transformExplosionKnockback
-