Package net.minecraft.enchantment
Class DamageEnchantment
java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.DamageEnchantment
- Mappings:
Namespace Name official cye
intermediary net/minecraft/class_1882
named 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 TypeMethodDescriptionboolean
canAccept
(Enchantment other) Returns whether this enchantment can exist on an item stack with theother
enchantment.float
getAttackDamage
(int level, @Nullable EntityType<?> entityType) void
onTargetDamaged
(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 b
Lcye;b:Ljava/util/Optional;
intermediary field_48369
Lnet/minecraft/class_1882;field_48369:Ljava/util/Optional;
named applicableEntities
Lnet/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;)V
intermediary <init>
Lnet/minecraft/class_1882;<init>(Lnet/minecraft/class_1887$class_9427;Ljava/util/Optional;)V
named <init>
Lnet/minecraft/enchantment/DamageEnchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Properties;Ljava/util/Optional;)V
-
-
Method Details
-
getAttackDamage
- Overrides:
getAttackDamage
in classEnchantment
- Mappings:
Namespace Name Mixin selector official a
Lcyg;a(ILbrn;)F
intermediary method_8196
Lnet/minecraft/class_1887;method_8196(ILnet/minecraft/class_1299;)F
named getAttackDamage
Lnet/minecraft/enchantment/Enchantment;getAttackDamage(ILnet/minecraft/entity/EntityType;)F
-
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 official a
Lcyg;a(Lcyg;)Z
intermediary method_8180
Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Z
named canAccept
Lnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
-
onTargetDamaged
- Overrides:
onTargetDamaged
in classEnchantment
- Mappings:
Namespace Name Mixin selector official a
Lcyg;a(Lbsa;Lbrh;I)V
intermediary method_8189
Lnet/minecraft/class_1887;method_8189(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;I)V
named onTargetDamaged
Lnet/minecraft/enchantment/Enchantment;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;I)V
-