Package net.minecraft.enchantment
Class ProtectionEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.ProtectionEnchantment
- Mappings:
Namespace Name official buwintermediary net/minecraft/class_1900named net/minecraft/enchantment/ProtectionEnchantment
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.enchantment.Enchantment
Enchantment.Rarity -
Field Summary
FieldsFields inherited from class net.minecraft.enchantment.Enchantment
translationKey, type -
Constructor Summary
ConstructorsConstructorDescriptionProtectionEnchantment(Enchantment.Rarity weight, ProtectionEnchantment.Type protectionType, EquipmentSlot[] slotTypes) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccept(Enchantment other)Returns whether this enchantment can exist on an item stack with theotherenchantment.intintgetMaxPower(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 aLbuw;a:Lbuw$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 protectionType, EquipmentSlot[] slotTypes)- Mappings:
Namespace Name Mixin selector official <init>Lbuw;<init>(Lbuj$a;Lbuw$a;[Latk;)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 aLbuj;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 bLbuj;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 aLbuj;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 aLbuj;a(ILasp;)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 aLbuj;a(Lbuj;)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 aLbuw;a(Latt;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 aLbuw;a(Latt;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
-