Package net.minecraft.enchantment
Class ProtectionEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.ProtectionEnchantment
public class ProtectionEnchantment extends Enchantment
- Mappings:
Namespace Name official bscintermediary net/minecraft/class_1900named net/minecraft/enchantment/ProtectionEnchantment
-
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
- Mappings:
Namespace Name Mixin selector official aLbsc;a:Lbsc$a;intermediary field_9133Lnet/minecraft/class_1900;field_9133:Lnet/minecraft/class_1900$class_1901;named protectionTypeLnet/minecraft/enchantment/ProtectionEnchantment;protectionType:Lnet/minecraft/enchantment/ProtectionEnchantment$Type;
-
-
Constructor Details
-
ProtectionEnchantment
public ProtectionEnchantment(Enchantment.Rarity weight, ProtectionEnchantment.Type type, EquipmentSlot[] equipmentSlot)- Mappings:
Namespace Name Mixin selector official <init>Lbsc;<init>(Lbrp$a;Lbsc$a;[Lara;)Vintermediary <init>Lnet/minecraft/class_1900;<init>(Lnet/minecraft/class_1887$class_1888;Lnet/minecraft/class_1900$class_1901;[Lnet/minecraft/class_1304;)Vnamed <init>Lnet/minecraft/enchantment/ProtectionEnchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Rarity;Lnet/minecraft/enchantment/ProtectionEnchantment$Type;[Lnet/minecraft/entity/EquipmentSlot;)V
-
-
Method Details
-
getMinPower
public int getMinPower(int level)- Overrides:
getMinPowerin classEnchantment- Mappings:
Namespace Name Mixin selector official aLbrp;a(I)Iintermediary method_8182Lnet/minecraft/class_1887;method_8182(I)Inamed getMinPowerLnet/minecraft/enchantment/Enchantment;getMinPower(I)I
-
getMaxPower
public int getMaxPower(int level)- Overrides:
getMaxPowerin classEnchantment- Mappings:
Namespace Name Mixin selector official bLbrp;b(I)Iintermediary method_20742Lnet/minecraft/class_1887;method_20742(I)Inamed getMaxPowerLnet/minecraft/enchantment/Enchantment;getMaxPower(I)I
-
getMaxLevel
public int getMaxLevel()- Overrides:
getMaxLevelin classEnchantment- Mappings:
Namespace Name Mixin selector official aLbrp;a()Iintermediary method_8183Lnet/minecraft/class_1887;method_8183()Inamed getMaxLevelLnet/minecraft/enchantment/Enchantment;getMaxLevel()I
-
getProtectionAmount
- Overrides:
getProtectionAmountin classEnchantment- Mappings:
Namespace Name Mixin selector official aLbrp;a(ILaqf;)Iintermediary method_8181Lnet/minecraft/class_1887;method_8181(ILnet/minecraft/class_1282;)Inamed getProtectionAmountLnet/minecraft/enchantment/Enchantment;getProtectionAmount(ILnet/minecraft/entity/damage/DamageSource;)I
-
canAccept
Returns whether this enchantment can exist on an item stack with theotherenchantment.- Overrides:
canAcceptin classEnchantment- Mappings:
Namespace Name Mixin selector official aLbrp;a(Lbrp;)Zintermediary method_8180Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Znamed canAcceptLnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
-
transformFireDuration
- Mappings:
Namespace Name Mixin selector official aLbsc;a(Lari;I)Iintermediary method_8238Lnet/minecraft/class_1900;method_8238(Lnet/minecraft/class_1309;I)Inamed transformFireDurationLnet/minecraft/enchantment/ProtectionEnchantment;transformFireDuration(Lnet/minecraft/entity/LivingEntity;I)I
-
transformExplosionKnockback
- Mappings:
Namespace Name Mixin selector official aLbsc;a(Lari;D)Dintermediary method_8237Lnet/minecraft/class_1900;method_8237(Lnet/minecraft/class_1309;D)Dnamed transformExplosionKnockbackLnet/minecraft/enchantment/ProtectionEnchantment;transformExplosionKnockback(Lnet/minecraft/entity/LivingEntity;D)D
-