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/ProtectionEnchantmentintermediary net/minecraft/class_1900official dal
-
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
translationKeyFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsConstructorDescriptionProtectionEnchantment(Enchantment.Properties properties, ProtectionEnchantment.Type protectionType) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.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, 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, propertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
protectionType
- Mappings:
Namespace Name Mixin selector named protectionTypeLnet/minecraft/enchantment/ProtectionEnchantment;protectionType:Lnet/minecraft/enchantment/ProtectionEnchantment$Type;intermediary field_9133Lnet/minecraft/class_1900;field_9133:Lnet/minecraft/class_1900$class_1901;official bLdal;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;)Vintermediary <init>Lnet/minecraft/class_1900;<init>(Lnet/minecraft/class_1887$class_9427;Lnet/minecraft/class_1900$class_1901;)Vofficial <init>Ldal;<init>(Ldac$b;Ldal$a;)V
-
-
Method Details
-
getProtectionAmount
- Overrides:
getProtectionAmountin classEnchantment- Mappings:
Namespace Name Mixin selector named getProtectionAmountLnet/minecraft/enchantment/Enchantment;getProtectionAmount(ILnet/minecraft/entity/damage/DamageSource;)Iintermediary method_8181Lnet/minecraft/class_1887;method_8181(ILnet/minecraft/class_1282;)Iofficial aLdac;a(ILbrp;)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 named canAcceptLnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Zintermediary method_8180Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Zofficial aLdac;a(Ldac;)Z
-
transformFireDuration
- Mappings:
Namespace Name Mixin selector named transformFireDurationLnet/minecraft/enchantment/ProtectionEnchantment;transformFireDuration(Lnet/minecraft/entity/LivingEntity;I)Iintermediary method_8238Lnet/minecraft/class_1900;method_8238(Lnet/minecraft/class_1309;I)Iofficial aLdal;a(Lbtr;I)I
-
transformExplosionKnockback
- Mappings:
Namespace Name Mixin selector named transformExplosionKnockbackLnet/minecraft/enchantment/ProtectionEnchantment;transformExplosionKnockback(Lnet/minecraft/entity/LivingEntity;D)Dintermediary method_8237Lnet/minecraft/class_1900;method_8237(Lnet/minecraft/class_1309;D)Dofficial aLdal;a(Lbtr;D)D
-