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 czy
  • 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 Lczy;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> Lczy;<init>(Ldab$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 Ldab;a(ILbtb;)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 Ldab;a(Ldab;)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 Ldab;a(Lbtq;Lbsv;I)V