Class Enchantment

java.lang.Object
net.minecraft.enchantment.Enchantment
Direct Known Subclasses:
AquaAffinityEnchantment, BetterLootEnchantment, BindingCurseEnchantment, ChannelingEnchantment, DamageEnchantment, DepthStriderEnchantment, EfficiencyEnchantment, FireAspectEnchantment, FlameEnchantment, FrostWalkerEnchantment, ImpalingEnchantment, InfinityEnchantment, KnockbackEnchantment, LoyaltyEnchantment, LureEnchantment, MendingEnchantment, PowerEnchantment, ProtectionEnchantment, PunchEnchantment, RespirationEnchantment, RiptideEnchantment, SilkTouchEnchantment, SweepingEnchantment, ThornsEnchantment, UnbreakingEnchantment, VanishingCurseEnchantment

public abstract class Enchantment extends Object
Mappings:
Namespace Name
official awe
intermediary net/minecraft/class_1127
named net/minecraft/enchantment/Enchantment
  • Field Details

    • wearableSlots

      private final EquipmentSlot[] wearableSlots
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a:[Laew;
      intermediary field_12386 Lnet/minecraft/class_1127;field_12386:[Lnet/minecraft/class_2968;
      named wearableSlots Lnet/minecraft/enchantment/Enchantment;wearableSlots:[Lnet/minecraft/entity/EquipmentSlot;
    • rarity

      private final Enchantment.Rarity rarity
      Mappings:
      Namespace Name Mixin selector
      official d Lawe;d:Lawe$a;
      intermediary field_12388 Lnet/minecraft/class_1127;field_12388:Lnet/minecraft/class_1127$class_2703;
      named rarity Lnet/minecraft/enchantment/Enchantment;rarity:Lnet/minecraft/enchantment/Enchantment$Rarity;
    • target

      Mappings:
      Namespace Name Mixin selector
      official b Lawe;b:Lawf;
      intermediary field_4477 Lnet/minecraft/class_1127;field_4477:Lnet/minecraft/class_1128;
      named target Lnet/minecraft/enchantment/Enchantment;target:Lnet/minecraft/enchantment/EnchantmentTarget;
    • translationKey

      @Nullable protected String translationKey
      Mappings:
      Namespace Name Mixin selector
      official c Lawe;c:Ljava/lang/String;
      intermediary field_4478 Lnet/minecraft/class_1127;field_4478:Ljava/lang/String;
      named translationKey Lnet/minecraft/enchantment/Enchantment;translationKey:Ljava/lang/String;
  • Constructor Details

    • Enchantment

      protected Enchantment(Enchantment.Rarity rarity, EnchantmentTarget target, EquipmentSlot[] wearableSlots)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lawe;<init>(Lawe$a;Lawf;[Laew;)V
      intermediary <init> Lnet/minecraft/class_1127;<init>(Lnet/minecraft/class_1127$class_2703;Lnet/minecraft/class_1128;[Lnet/minecraft/class_2968;)V
      named <init> Lnet/minecraft/enchantment/Enchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Rarity;Lnet/minecraft/enchantment/EnchantmentTarget;[Lnet/minecraft/entity/EquipmentSlot;)V
  • Method Details

    • byIndex

      @Environment(CLIENT) @Nullable public static Enchantment byIndex(int id)
      Mappings:
      Namespace Name Mixin selector
      official c Lawe;c(I)Lawe;
      intermediary method_11447 Lnet/minecraft/class_1127;method_11447(I)Lnet/minecraft/class_1127;
      named byIndex Lnet/minecraft/enchantment/Enchantment;byIndex(I)Lnet/minecraft/enchantment/Enchantment;
    • method_13673

      public List<ItemStack> method_13673(LivingEntity livingEntity)
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a(Lafa;)Ljava/util/List;
      intermediary method_13673 Lnet/minecraft/class_1127;method_13673(Lnet/minecraft/class_1699;)Ljava/util/List;
      named method_13673 Lnet/minecraft/enchantment/Enchantment;method_13673(Lnet/minecraft/entity/LivingEntity;)Ljava/util/List;
    • getRarity

      public Enchantment.Rarity getRarity()
      Mappings:
      Namespace Name Mixin selector
      official d Lawe;d()Lawe$a;
      intermediary method_3515 Lnet/minecraft/class_1127;method_3515()Lnet/minecraft/class_1127$class_2703;
      named getRarity Lnet/minecraft/enchantment/Enchantment;getRarity()Lnet/minecraft/enchantment/Enchantment$Rarity;
    • getMinimumLevel

      public int getMinimumLevel()
      Mappings:
      Namespace Name Mixin selector
      official e Lawe;e()I
      intermediary method_3517 Lnet/minecraft/class_1127;method_3517()I
      named getMinimumLevel Lnet/minecraft/enchantment/Enchantment;getMinimumLevel()I
    • getMaximumLevel

      public int getMaximumLevel()
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a()I
      intermediary method_3512 Lnet/minecraft/class_1127;method_3512()I
      named getMaximumLevel Lnet/minecraft/enchantment/Enchantment;getMaximumLevel()I
    • getMinimumPower

      public int getMinimumPower(int level)
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a(I)I
      intermediary method_3508 Lnet/minecraft/class_1127;method_3508(I)I
      named getMinimumPower Lnet/minecraft/enchantment/Enchantment;getMinimumPower(I)I
    • getMaximumPower

      public int getMaximumPower(int level)
      Mappings:
      Namespace Name Mixin selector
      official b Lawe;b(I)I
      intermediary method_3513 Lnet/minecraft/class_1127;method_3513(I)I
      named getMaximumPower Lnet/minecraft/enchantment/Enchantment;getMaximumPower(I)I
    • getProtectionAmount

      public int getProtectionAmount(int level, DamageSource source)
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a(ILaea;)I
      intermediary method_3509 Lnet/minecraft/class_1127;method_3509(ILnet/minecraft/class_856;)I
      named getProtectionAmount Lnet/minecraft/enchantment/Enchantment;getProtectionAmount(ILnet/minecraft/entity/damage/DamageSource;)I
    • method_5489

      public float method_5489(int int2, class_3462 class_3462)
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a(ILafd;)F
      intermediary method_5489 Lnet/minecraft/class_1127;method_5489(ILnet/minecraft/class_3462;)F
      named method_5489 Lnet/minecraft/enchantment/Enchantment;method_5489(ILnet/minecraft/class_3462;)F
    • isDifferent

      public final boolean isDifferent(Enchantment other)
      Mappings:
      Namespace Name Mixin selector
      official b Lawe;b(Lawe;)Z
      intermediary method_13674 Lnet/minecraft/class_1127;method_13674(Lnet/minecraft/class_1127;)Z
      named isDifferent Lnet/minecraft/enchantment/Enchantment;isDifferent(Lnet/minecraft/enchantment/Enchantment;)Z
    • differs

      protected boolean differs(Enchantment other)
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a(Lawe;)Z
      intermediary method_3511 Lnet/minecraft/class_1127;method_3511(Lnet/minecraft/class_1127;)Z
      named differs Lnet/minecraft/enchantment/Enchantment;differs(Lnet/minecraft/enchantment/Enchantment;)Z
    • method_16258

      protected String method_16258()
      Mappings:
      Namespace Name Mixin selector
      official f Lawe;f()Ljava/lang/String;
      intermediary method_16258 Lnet/minecraft/class_1127;method_16258()Ljava/lang/String;
      named method_16258 Lnet/minecraft/enchantment/Enchantment;method_16258()Ljava/lang/String;
    • getTranslationKey

      public String getTranslationKey()
      Mappings:
      Namespace Name Mixin selector
      official g Lawe;g()Ljava/lang/String;
      intermediary method_3507 Lnet/minecraft/class_1127;method_3507()Ljava/lang/String;
      named getTranslationKey Lnet/minecraft/enchantment/Enchantment;getTranslationKey()Ljava/lang/String;
    • method_16257

      public Text method_16257(int int2)
      Mappings:
      Namespace Name Mixin selector
      official d Lawe;d(I)Lij;
      intermediary method_16257 Lnet/minecraft/class_1127;method_16257(I)Lnet/minecraft/class_1982;
      named method_16257 Lnet/minecraft/enchantment/Enchantment;method_16257(I)Lnet/minecraft/text/Text;
    • isAcceptableItem

      public boolean isAcceptableItem(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a(Late;)Z
      intermediary method_4644 Lnet/minecraft/class_1127;method_4644(Lnet/minecraft/class_1071;)Z
      named isAcceptableItem Lnet/minecraft/enchantment/Enchantment;isAcceptableItem(Lnet/minecraft/item/ItemStack;)Z
    • onDamage

      public void onDamage(LivingEntity livingEntity, Entity entity, int power)
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a(Lafa;Laer;I)V
      intermediary method_6381 Lnet/minecraft/class_1127;method_6381(Lnet/minecraft/class_1699;Lnet/minecraft/class_864;I)V
      named onDamage Lnet/minecraft/enchantment/Enchantment;onDamage(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;I)V
    • onDamaged

      public void onDamaged(LivingEntity livingEntity, Entity entity, int power)
      Mappings:
      Namespace Name Mixin selector
      official b Lawe;b(Lafa;Laer;I)V
      intermediary method_6382 Lnet/minecraft/class_1127;method_6382(Lnet/minecraft/class_1699;Lnet/minecraft/class_864;I)V
      named onDamaged Lnet/minecraft/enchantment/Enchantment;onDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;I)V
    • isTreasure

      public boolean isTreasure()
      Mappings:
      Namespace Name Mixin selector
      official b Lawe;b()Z
      intermediary method_11448 Lnet/minecraft/class_1127;method_11448()Z
      named isTreasure Lnet/minecraft/enchantment/Enchantment;isTreasure()Z
    • isCursed

      public boolean isCursed()
      Mappings:
      Namespace Name Mixin selector
      official c Lawe;c()Z
      intermediary method_13675 Lnet/minecraft/class_1127;method_13675()Z
      named isCursed Lnet/minecraft/enchantment/Enchantment;isCursed()Z
    • register

      public static void register()
      Mappings:
      Namespace Name Mixin selector
      official h Lawe;h()V
      intermediary method_11449 Lnet/minecraft/class_1127;method_11449()V
      named register Lnet/minecraft/enchantment/Enchantment;register()V
    • register

      private static void register(String identifier, Enchantment enchantment)
      Mappings:
      Namespace Name Mixin selector
      official a Lawe;a(Ljava/lang/String;Lawe;)V
      intermediary method_16256 Lnet/minecraft/class_1127;method_16256(Ljava/lang/String;Lnet/minecraft/class_1127;)V
      named register Lnet/minecraft/enchantment/Enchantment;register(Ljava/lang/String;Lnet/minecraft/enchantment/Enchantment;)V