Class ProtectionEnchantment
java.lang.Object
net.minecraft.world.item.enchantment.Enchantment
net.minecraft.world.item.enchantment.ProtectionEnchantment
- All Implemented Interfaces:
FeatureElement,IEnchantmentExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.item.enchantment.Enchantment
Enchantment.Cost, Enchantment.EnchantmentDefinition -
Field Summary
FieldsFields inherited from class net.minecraft.world.item.enchantment.Enchantment
descriptionIdFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionProtectionEnchantment(Enchantment.EnchantmentDefinition p_335937_, ProtectionEnchantment.Type p_45127_) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCompatibility(Enchantment p_45142_) intgetDamageProtection(int p_45133_, DamageSource p_45134_) static doublegetExplosionKnockbackAfterDampener(LivingEntity p_45136_, double p_45137_) static intgetFireAfterDampener(LivingEntity p_45139_, int p_45140_) Methods inherited from class net.minecraft.world.item.enchantment.Enchantment
builtInRegistryHolder, byId, canApplyAtEnchantingTable, canEnchant, constantCost, definition, definition, definition, doPostAttack, doPostHurt, doPostItemStackHurt, dynamicCost, getAnvilCost, getDamageBonus, getDescriptionId, getFullname, getMaxCost, getMaxLevel, getMinCost, getMinLevel, getOrCreateDescriptionId, getSlotItems, getSupportedItems, getWeight, isAllowedOnBooks, isCompatibleWith, isCurse, isDiscoverable, isPrimaryItem, isTradeable, isTreasureOnly, requiredFeaturesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IEnchantmentExtension
allowedInCreativeTab, getDamageBonus
-
Field Details
-
type
-
-
Constructor Details
-
ProtectionEnchantment
public ProtectionEnchantment(Enchantment.EnchantmentDefinition p_335937_, ProtectionEnchantment.Type p_45127_)
-
-
Method Details
-
getDamageProtection
- Overrides:
getDamageProtectionin classEnchantment
-
checkCompatibility
- Overrides:
checkCompatibilityin classEnchantment
-
getFireAfterDampener
-
getExplosionKnockbackAfterDampener
-