Package net.minecraft.enchantment
Class ProtectionEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.ProtectionEnchantment
- Mappings:
Namespace Name official cyp
intermediary net/minecraft/class_1900
named net/minecraft/enchantment/ProtectionEnchantment
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.enchantment.Enchantment
Enchantment.Cost, Enchantment.Properties
-
Field Summary
FieldsFields inherited from class net.minecraft.enchantment.Enchantment
translationKey
-
Constructor Summary
ConstructorsConstructorDescriptionProtectionEnchantment
(Enchantment.Properties properties, ProtectionEnchantment.Type protectionType) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.int
getProtectionAmount
(int level, DamageSource source) static double
transformExplosionKnockback
(LivingEntity entity, double velocity) static int
transformFireDuration
(LivingEntity entity, int duration) Methods inherited from class net.minecraft.enchantment.Enchantment
byRawId, canCombine, constantCost, getAnvilCost, getApplicableItems, getAttackDamage, getEquipment, getMaxLevel, getMaxPower, getMinLevel, getMinPower, getName, getOrCreateTranslationKey, getRegistryEntry, getTranslationKey, getWeight, isAcceptableItem, isAvailableForEnchantedBookOffer, isAvailableForRandomSelection, isCursed, isPrimaryItem, isTreasure, leveledCost, onTargetDamaged, onUserDamaged, properties, properties
-
Field Details
-
protectionType
- Mappings:
Namespace Name Mixin selector official b
Lcyp;b:Lcyp$a;
intermediary field_9133
Lnet/minecraft/class_1900;field_9133:Lnet/minecraft/class_1900$class_1901;
named protectionType
Lnet/minecraft/enchantment/ProtectionEnchantment;protectionType:Lnet/minecraft/enchantment/ProtectionEnchantment$Type;
-
-
Constructor Details
-
ProtectionEnchantment
public ProtectionEnchantment(Enchantment.Properties properties, ProtectionEnchantment.Type protectionType) - Mappings:
Namespace Name Mixin selector official <init>
Lcyp;<init>(Lcyg$b;Lcyp$a;)V
intermediary <init>
Lnet/minecraft/class_1900;<init>(Lnet/minecraft/class_1887$class_9427;Lnet/minecraft/class_1900$class_1901;)V
named <init>
Lnet/minecraft/enchantment/ProtectionEnchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Properties;Lnet/minecraft/enchantment/ProtectionEnchantment$Type;)V
-
-
Method Details
-
getProtectionAmount
- Overrides:
getProtectionAmount
in classEnchantment
- Mappings:
Namespace Name Mixin selector official a
Lcyg;a(ILbqf;)I
intermediary method_8181
Lnet/minecraft/class_1887;method_8181(ILnet/minecraft/class_1282;)I
named getProtectionAmount
Lnet/minecraft/enchantment/Enchantment;getProtectionAmount(ILnet/minecraft/entity/damage/DamageSource;)I
-
canAccept
Returns whether this enchantment can exist on an item stack with theother
enchantment.- Overrides:
canAccept
in classEnchantment
- Returns:
- whether this enchantment can exist on an item stack with the
other
enchantment - Mappings:
Namespace Name Mixin selector official a
Lcyg;a(Lcyg;)Z
intermediary method_8180
Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Z
named canAccept
Lnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
-
transformFireDuration
- Mappings:
Namespace Name Mixin selector official a
Lcyp;a(Lbsa;I)I
intermediary method_8238
Lnet/minecraft/class_1900;method_8238(Lnet/minecraft/class_1309;I)I
named transformFireDuration
Lnet/minecraft/enchantment/ProtectionEnchantment;transformFireDuration(Lnet/minecraft/entity/LivingEntity;I)I
-
transformExplosionKnockback
- Mappings:
Namespace Name Mixin selector official a
Lcyp;a(Lbsa;D)D
intermediary method_8237
Lnet/minecraft/class_1900;method_8237(Lnet/minecraft/class_1309;D)D
named transformExplosionKnockback
Lnet/minecraft/enchantment/ProtectionEnchantment;transformExplosionKnockback(Lnet/minecraft/entity/LivingEntity;D)D
-