Class DamageEnchantment

java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.DamageEnchantment
All Implemented Interfaces:
ToggleableFeature

public class DamageEnchantment extends Enchantment
Mappings:
Namespace Name
named net/minecraft/enchantment/DamageEnchantment
intermediary net/minecraft/class_1882
official czz
  • Field Details

    • applicableEntities

      private final Optional<TagKey<EntityType<?>>> 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

      public float getAttackDamage(int level, @Nullable @Nullable EntityType<?> entityType)
      Overrides:
      getAttackDamage in class Enchantment
      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

      public boolean canAccept(Enchantment other)
      Returns whether this enchantment can exist on an item stack with the other enchantment.
      Overrides:
      canAccept in class Enchantment
      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

      public void onTargetDamaged(LivingEntity user, Entity target, int level)
      Overrides:
      onTargetDamaged in class Enchantment
      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