Package net.minecraft.enchantment
Class ProtectionEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.ProtectionEnchantment
- Mappings:
Namespace Name official cnqintermediary 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
target, translationKey -
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 aLcnq;a:Lcnq$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>Lcnq;<init>(Lcnd$a;Lcnq$a;[Lbil;)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 aLcnd;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 bLcnd;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 aLcnd;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 aLcnd;a(ILbhe;)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- Returns:
- whether this enchantment can exist on an item stack with the
otherenchantment - Mappings:
Namespace Name Mixin selector official aLcnd;a(Lcnd;)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 aLcnq;a(Lbiw;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 aLcnq;a(Lbiw;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
-