Package net.minecraft.enchantment
Class DamageEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.DamageEnchantment
- Mappings:
Namespace Name official cyeintermediary net/minecraft/class_1882named net/minecraft/enchantment/DamageEnchantment
-
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
translationKey -
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, getTranslationKey, getWeight, isAcceptableItem, isAvailableForEnchantedBookOffer, isAvailableForRandomSelection, isCursed, isPrimaryItem, isTreasure, leveledCost, onUserDamaged, properties, properties
-
Field Details
-
applicableEntities
- Mappings:
Namespace Name Mixin selector official bLcye;b:Ljava/util/Optional;intermediary field_48369Lnet/minecraft/class_1882;field_48369:Ljava/util/Optional;named applicableEntitiesLnet/minecraft/enchantment/DamageEnchantment;applicableEntities:Ljava/util/Optional;
-
-
Constructor Details
-
DamageEnchantment
public DamageEnchantment(Enchantment.Properties properties, Optional<TagKey<EntityType<?>>> applicableEntities) - Mappings:
Namespace Name Mixin selector official <init>Lcye;<init>(Lcyg$b;Ljava/util/Optional;)Vintermediary <init>Lnet/minecraft/class_1882;<init>(Lnet/minecraft/class_1887$class_9427;Ljava/util/Optional;)Vnamed <init>Lnet/minecraft/enchantment/DamageEnchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Properties;Ljava/util/Optional;)V
-
-
Method Details
-
getAttackDamage
- Overrides:
getAttackDamagein classEnchantment- Mappings:
Namespace Name Mixin selector official aLcyg;a(ILbrn;)Fintermediary method_8196Lnet/minecraft/class_1887;method_8196(ILnet/minecraft/class_1299;)Fnamed getAttackDamageLnet/minecraft/enchantment/Enchantment;getAttackDamage(ILnet/minecraft/entity/EntityType;)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 official aLcyg;a(Lcyg;)Zintermediary method_8180Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Znamed canAcceptLnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
-
onTargetDamaged
- Overrides:
onTargetDamagedin classEnchantment- Mappings:
Namespace Name Mixin selector official aLcyg;a(Lbsa;Lbrh;I)Vintermediary method_8189Lnet/minecraft/class_1887;method_8189(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;I)Vnamed onTargetDamagedLnet/minecraft/enchantment/Enchantment;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;I)V
-