Package net.minecraft.enchantment
Class ProtectionEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.ProtectionEnchantment
- All Implemented Interfaces:
ToggleableFeature
- Mappings:
Namespace Name named net/minecraft/enchantment/ProtectionEnchantment
intermediary net/minecraft/class_1900
official dal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.enchantment.Enchantment
Enchantment.Cost, Enchantment.Properties
-
Field Summary
Fields inherited from class net.minecraft.enchantment.Enchantment
translationKey
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
ConstructorDescriptionProtectionEnchantment
(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, getRequiredFeatures, getTranslationKey, getWeight, isAcceptableItem, isAvailableForEnchantedBookOffer, isAvailableForRandomSelection, isCursed, isPrimaryItem, isTreasure, leveledCost, onAttack, onTargetDamaged, onUserDamaged, properties, properties, properties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
protectionType
- Mappings:
Namespace Name Mixin selector named protectionType
Lnet/minecraft/enchantment/ProtectionEnchantment;protectionType:Lnet/minecraft/enchantment/ProtectionEnchantment$Type;
intermediary field_9133
Lnet/minecraft/class_1900;field_9133:Lnet/minecraft/class_1900$class_1901;
official b
Ldal;b:Ldal$a;
-
-
Constructor Details
-
ProtectionEnchantment
public ProtectionEnchantment(Enchantment.Properties properties, ProtectionEnchantment.Type protectionType) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/enchantment/ProtectionEnchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Properties;Lnet/minecraft/enchantment/ProtectionEnchantment$Type;)V
intermediary <init>
Lnet/minecraft/class_1900;<init>(Lnet/minecraft/class_1887$class_9427;Lnet/minecraft/class_1900$class_1901;)V
official <init>
Ldal;<init>(Ldac$b;Ldal$a;)V
-
-
Method Details
-
getProtectionAmount
- Overrides:
getProtectionAmount
in classEnchantment
- Mappings:
Namespace Name Mixin selector named getProtectionAmount
Lnet/minecraft/enchantment/Enchantment;getProtectionAmount(ILnet/minecraft/entity/damage/DamageSource;)I
intermediary method_8181
Lnet/minecraft/class_1887;method_8181(ILnet/minecraft/class_1282;)I
official a
Ldac;a(ILbrp;)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 named canAccept
Lnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
intermediary method_8180
Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Z
official a
Ldac;a(Ldac;)Z
-
transformFireDuration
- Mappings:
Namespace Name Mixin selector named transformFireDuration
Lnet/minecraft/enchantment/ProtectionEnchantment;transformFireDuration(Lnet/minecraft/entity/LivingEntity;I)I
intermediary method_8238
Lnet/minecraft/class_1900;method_8238(Lnet/minecraft/class_1309;I)I
official a
Ldal;a(Lbtr;I)I
-
transformExplosionKnockback
- Mappings:
Namespace Name Mixin selector named transformExplosionKnockback
Lnet/minecraft/enchantment/ProtectionEnchantment;transformExplosionKnockback(Lnet/minecraft/entity/LivingEntity;D)D
intermediary method_8237
Lnet/minecraft/class_1900;method_8237(Lnet/minecraft/class_1309;D)D
official a
Ldal;a(Lbtr;D)D
-