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/DamageEnchantment
intermediary net/minecraft/class_1882
official czz
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.enchantment.Enchantment
Enchantment.Cost, Enchantment.Properties
-
Field Summary
Fields inherited from class net.minecraft.enchantment.Enchantment
translationKey
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
ConstructorDescriptionDamageEnchantment
(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, getRequiredFeatures, getTranslationKey, getWeight, isAcceptableItem, isAvailableForEnchantedBookOffer, isAvailableForRandomSelection, isCursed, isPrimaryItem, isTreasure, leveledCost, onAttack, onUserDamaged, properties, properties, properties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
applicableEntities
- Mappings:
Namespace Name Mixin selector named applicableEntities
Lnet/minecraft/enchantment/DamageEnchantment;applicableEntities:Ljava/util/Optional;
intermediary field_48369
Lnet/minecraft/class_1882;field_48369:Ljava/util/Optional;
official b
Lczz;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;)V
intermediary <init>
Lnet/minecraft/class_1882;<init>(Lnet/minecraft/class_1887$class_9427;Ljava/util/Optional;)V
official <init>
Lczz;<init>(Ldac$b;Ljava/util/Optional;)V
-
-
Method Details
-
getAttackDamage
- Overrides:
getAttackDamage
in classEnchantment
- Mappings:
Namespace Name Mixin selector named getAttackDamage
Lnet/minecraft/enchantment/Enchantment;getAttackDamage(ILnet/minecraft/entity/EntityType;)F
intermediary method_8196
Lnet/minecraft/class_1887;method_8196(ILnet/minecraft/class_1299;)F
official a
Ldac;a(ILbtc;)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 named canAccept
Lnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
intermediary method_8180
Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Z
official a
Ldac;a(Ldac;)Z
-
onTargetDamaged
- Overrides:
onTargetDamaged
in classEnchantment
- Mappings:
Namespace Name Mixin selector named onTargetDamaged
Lnet/minecraft/enchantment/Enchantment;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;I)V
intermediary method_8189
Lnet/minecraft/class_1887;method_8189(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;I)V
official a
Ldac;a(Lbtr;Lbsw;I)V
-