Package net.minecraft.enchantment
Class DamageEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.DamageEnchantment
- All Implemented Interfaces:
ToggleableFeature
- Mappings:
Namespace Name named net/minecraft/enchantment/DamageEnchantmentintermediary net/minecraft/class_1882official czz
-
Nested Class Summary
Nested 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
ConstructorsConstructorDescriptionDamageEnchantment(Enchantment.Properties properties, Optional<TagKey<EntityType<?>>> applicableEntities) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccept(Enchantment other) Returns whether this enchantment can exist on an item stack with theotherenchantment.floatgetAttackDamage(int level, @Nullable EntityType<?> entityType) voidonTargetDamaged(LivingEntity user, Entity target, int level) Methods inherited from class net.minecraft.enchantment.Enchantment
byRawId, canCombine, constantCost, getAnvilCost, getApplicableItems, getEquipment, getMaxLevel, getMaxPower, getMinLevel, getMinPower, getName, getOrCreateTranslationKey, getProtectionAmount, getRegistryEntry, getRequiredFeatures, getTranslationKey, getWeight, isAcceptableItem, isAvailableForEnchantedBookOffer, isAvailableForRandomSelection, isCursed, isPrimaryItem, isTreasure, leveledCost, onAttack, 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
-
applicableEntities
- Mappings:
Namespace Name Mixin selector named applicableEntitiesLnet/minecraft/enchantment/DamageEnchantment;applicableEntities:Ljava/util/Optional;intermediary field_48369Lnet/minecraft/class_1882;field_48369:Ljava/util/Optional;official bLczz;b:Ljava/util/Optional;
-
-
Constructor Details
-
DamageEnchantment
public DamageEnchantment(Enchantment.Properties properties, Optional<TagKey<EntityType<?>>> applicableEntities) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/enchantment/DamageEnchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Properties;Ljava/util/Optional;)Vintermediary <init>Lnet/minecraft/class_1882;<init>(Lnet/minecraft/class_1887$class_9427;Ljava/util/Optional;)Vofficial <init>Lczz;<init>(Ldac$b;Ljava/util/Optional;)V
-
-
Method Details
-
getAttackDamage
- Overrides:
getAttackDamagein classEnchantment- Mappings:
Namespace Name Mixin selector named getAttackDamageLnet/minecraft/enchantment/Enchantment;getAttackDamage(ILnet/minecraft/entity/EntityType;)Fintermediary method_8196Lnet/minecraft/class_1887;method_8196(ILnet/minecraft/class_1299;)Fofficial aLdac;a(ILbtc;)F
-
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
-
onTargetDamaged
- Overrides:
onTargetDamagedin classEnchantment- Mappings:
Namespace Name Mixin selector named onTargetDamagedLnet/minecraft/enchantment/Enchantment;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;I)Vintermediary method_8189Lnet/minecraft/class_1887;method_8189(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;I)Vofficial aLdac;a(Lbtr;Lbsw;I)V
-