Class EnchantmentHelper

java.lang.Object
net.minecraft.enchantment.EnchantmentHelper

public class EnchantmentHelper extends Object
Mappings:
Namespace Name
official aph
intermediary net/minecraft/class_1129
named net/minecraft/enchantment/EnchantmentHelper
  • Field Details

    • RANDOM

      private static final Random RANDOM
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a:Ljava/util/Random;
      intermediary field_4489 Lnet/minecraft/class_1129;field_4489:Ljava/util/Random;
      named RANDOM Lnet/minecraft/enchantment/EnchantmentHelper;RANDOM:Ljava/util/Random;
    • field_4490

      private static final class_1133 field_4490
      Mappings:
      Namespace Name Mixin selector
      official b Laph;b:Lapn;
      intermediary field_4490 Lnet/minecraft/class_1129;field_4490:Lnet/minecraft/class_1133;
      named field_4490 Lnet/minecraft/enchantment/EnchantmentHelper;field_4490:Lnet/minecraft/enchantment/class_1133;
    • field_4491

      private static final class_1132 field_4491
      Mappings:
      Namespace Name Mixin selector
      official c Laph;c:Lapm;
      intermediary field_4491 Lnet/minecraft/class_1129;field_4491:Lnet/minecraft/class_1132;
      named field_4491 Lnet/minecraft/enchantment/EnchantmentHelper;field_4491:Lnet/minecraft/enchantment/class_1132;
    • field_7159

      private static final class_1738 field_7159
      Mappings:
      Namespace Name Mixin selector
      official d Laph;d:Lapk;
      intermediary field_7159 Lnet/minecraft/class_1129;field_7159:Lnet/minecraft/class_1738;
      named field_7159 Lnet/minecraft/enchantment/EnchantmentHelper;field_7159:Lnet/minecraft/enchantment/class_1738;
    • field_7160

      private static final class_1737 field_7160
      Mappings:
      Namespace Name Mixin selector
      official e Laph;e:Lapj;
      intermediary field_7160 Lnet/minecraft/class_1129;field_7160:Lnet/minecraft/class_1737;
      named field_7160 Lnet/minecraft/enchantment/EnchantmentHelper;field_7160:Lnet/minecraft/enchantment/class_1737;
  • Constructor Details

    • EnchantmentHelper

      public EnchantmentHelper()
  • Method Details

    • method_3519

      public static int method_3519(int id, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(ILamj;)I
      intermediary method_3519 Lnet/minecraft/class_1129;method_3519(ILnet/minecraft/class_1071;)I
      named method_3519 Lnet/minecraft/enchantment/EnchantmentHelper;method_3519(ILnet/minecraft/item/ItemStack;)I
    • get

      public static Map get(ItemStack stack)
      Gets the enchantments on an item stack.

      For enchanted books, it retrieves from the item stack's stored than regular enchantments.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Lamj;)Ljava/util/Map;
      intermediary method_4648 Lnet/minecraft/class_1129;method_4648(Lnet/minecraft/class_1071;)Ljava/util/Map;
      named get Lnet/minecraft/enchantment/EnchantmentHelper;get(Lnet/minecraft/item/ItemStack;)Ljava/util/Map;
    • set

      public static void set(Map enchantments, ItemStack stack)
      Sets the enchantments on an item stack.

      For enchanted books, it sets the enchantments to the item stack's stored enchantments than regular enchantments.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Ljava/util/Map;Lamj;)V
      intermediary method_4645 Lnet/minecraft/class_1129;method_4645(Ljava/util/Map;Lnet/minecraft/class_1071;)V
      named set Lnet/minecraft/enchantment/EnchantmentHelper;set(Ljava/util/Map;Lnet/minecraft/item/ItemStack;)V
    • method_3520

      public static int method_3520(int int2, ItemStack[] itemStack)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(I[Lamj;)I
      intermediary method_3520 Lnet/minecraft/class_1129;method_3520(I[Lnet/minecraft/class_1071;)I
      named method_3520 Lnet/minecraft/enchantment/EnchantmentHelper;method_3520(I[Lnet/minecraft/item/ItemStack;)I
    • method_3526

      private static void method_3526(class_1131 class_1131, ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Lapl;Lamj;)V
      intermediary method_3526 Lnet/minecraft/class_1129;method_3526(Lnet/minecraft/class_1131;Lnet/minecraft/class_1071;)V
      named method_3526 Lnet/minecraft/enchantment/EnchantmentHelper;method_3526(Lnet/minecraft/enchantment/class_1131;Lnet/minecraft/item/ItemStack;)V
    • method_3527

      private static void method_3527(class_1131 class_1131, ItemStack[] itemStack)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Lapl;[Lamj;)V
      intermediary method_3527 Lnet/minecraft/class_1129;method_3527(Lnet/minecraft/class_1131;[Lnet/minecraft/class_1071;)V
      named method_3527 Lnet/minecraft/enchantment/EnchantmentHelper;method_3527(Lnet/minecraft/enchantment/class_1131;[Lnet/minecraft/item/ItemStack;)V
    • method_3524

      public static int method_3524(ItemStack[] itemStack, DamageSource damageSource)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a([Lamj;Lwh;)I
      intermediary method_3524 Lnet/minecraft/class_1129;method_3524([Lnet/minecraft/class_1071;Lnet/minecraft/class_856;)I
      named method_3524 Lnet/minecraft/enchantment/EnchantmentHelper;method_3524([Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/damage/DamageSource;)I
    • getAttackDamage

      public static float getAttackDamage(ItemStack stack, EntityGroup group)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Lamj;Lxs;)F
      intermediary method_6384 Lnet/minecraft/class_1129;method_6384(Lnet/minecraft/class_1071;Lnet/minecraft/class_873;)F
      named getAttackDamage Lnet/minecraft/enchantment/EnchantmentHelper;getAttackDamage(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/EntityGroup;)F
    • onUserDamaged

      public static void onUserDamaged(LivingEntity user, Entity attacker)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Lxm;Lwv;)V
      intermediary method_6386 Lnet/minecraft/class_1129;method_6386(Lnet/minecraft/class_1699;Lnet/minecraft/class_864;)V
      named onUserDamaged Lnet/minecraft/enchantment/EnchantmentHelper;onUserDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)V
    • onTargetDamaged

      public static void onTargetDamaged(LivingEntity user, Entity attacker)
      Mappings:
      Namespace Name Mixin selector
      official b Laph;b(Lxm;Lwv;)V
      intermediary method_6388 Lnet/minecraft/class_1129;method_6388(Lnet/minecraft/class_1699;Lnet/minecraft/class_864;)V
      named onTargetDamaged Lnet/minecraft/enchantment/EnchantmentHelper;onTargetDamaged(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;)V
    • getKnockback

      public static int getKnockback(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Lxm;)I
      intermediary method_5493 Lnet/minecraft/class_1129;method_5493(Lnet/minecraft/class_1699;)I
      named getKnockback Lnet/minecraft/enchantment/EnchantmentHelper;getKnockback(Lnet/minecraft/entity/LivingEntity;)I
    • getFireAspect

      public static int getFireAspect(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official b Laph;b(Lxm;)I
      intermediary method_5491 Lnet/minecraft/class_1129;method_5491(Lnet/minecraft/class_1699;)I
      named getFireAspect Lnet/minecraft/enchantment/EnchantmentHelper;getFireAspect(Lnet/minecraft/entity/LivingEntity;)I
    • method_8449

      public static int method_8449(Entity rntity)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Lwv;)I
      intermediary method_8449 Lnet/minecraft/class_1129;method_8449(Lnet/minecraft/class_864;)I
      named method_8449 Lnet/minecraft/enchantment/EnchantmentHelper;method_8449(Lnet/minecraft/entity/Entity;)I
    • method_8450

      public static int method_8450(Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official b Laph;b(Lwv;)I
      intermediary method_8450 Lnet/minecraft/class_1129;method_8450(Lnet/minecraft/class_864;)I
      named method_8450 Lnet/minecraft/enchantment/EnchantmentHelper;method_8450(Lnet/minecraft/entity/Entity;)I
    • method_5495

      public static int method_5495(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official c Laph;c(Lxm;)I
      intermediary method_5495 Lnet/minecraft/class_1129;method_5495(Lnet/minecraft/class_1699;)I
      named method_5495 Lnet/minecraft/enchantment/EnchantmentHelper;method_5495(Lnet/minecraft/entity/LivingEntity;)I
    • method_5496

      public static boolean method_5496(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official e Laph;e(Lxm;)Z
      intermediary method_5496 Lnet/minecraft/class_1129;method_5496(Lnet/minecraft/class_1699;)Z
      named method_5496 Lnet/minecraft/enchantment/EnchantmentHelper;method_5496(Lnet/minecraft/entity/LivingEntity;)Z
    • method_5497

      public static int method_5497(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official f Laph;f(Lxm;)I
      intermediary method_5497 Lnet/minecraft/class_1129;method_5497(Lnet/minecraft/class_1699;)I
      named method_5497 Lnet/minecraft/enchantment/EnchantmentHelper;method_5497(Lnet/minecraft/entity/LivingEntity;)I
    • method_6389

      public static int method_6389(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official g Laph;g(Lxm;)I
      intermediary method_6389 Lnet/minecraft/class_1129;method_6389(Lnet/minecraft/class_1699;)I
      named method_6389 Lnet/minecraft/enchantment/EnchantmentHelper;method_6389(Lnet/minecraft/entity/LivingEntity;)I
    • method_6390

      public static int method_6390(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official h Laph;h(Lxm;)I
      intermediary method_6390 Lnet/minecraft/class_1129;method_6390(Lnet/minecraft/class_1699;)I
      named method_6390 Lnet/minecraft/enchantment/EnchantmentHelper;method_6390(Lnet/minecraft/entity/LivingEntity;)I
    • method_5498

      public static int method_5498(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official i Laph;i(Lxm;)I
      intermediary method_5498 Lnet/minecraft/class_1129;method_5498(Lnet/minecraft/class_1699;)I
      named method_5498 Lnet/minecraft/enchantment/EnchantmentHelper;method_5498(Lnet/minecraft/entity/LivingEntity;)I
    • method_5499

      public static boolean method_5499(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official j Laph;j(Lxm;)Z
      intermediary method_5499 Lnet/minecraft/class_1129;method_5499(Lnet/minecraft/class_1699;)Z
      named method_5499 Lnet/minecraft/enchantment/EnchantmentHelper;method_5499(Lnet/minecraft/entity/LivingEntity;)Z
    • chooseEquipmentWith

      public static ItemStack chooseEquipmentWith(Enchantment enchantment, LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Lapf;Lxm;)Lamj;
      intermediary method_5490 Lnet/minecraft/class_1129;method_5490(Lnet/minecraft/class_1127;Lnet/minecraft/class_1699;)Lnet/minecraft/class_1071;
      named chooseEquipmentWith Lnet/minecraft/enchantment/EnchantmentHelper;chooseEquipmentWith(Lnet/minecraft/enchantment/Enchantment;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
    • calculateRequiredExperienceLevel

      public static int calculateRequiredExperienceLevel(Random random, int slotIndex, int bookshelfCount, ItemStack stack)
      Returns the required experience level for an enchanting option in the enchanting table's screen, or the enchantment screen.
      Parameters:
      random - the random, which guarantees consistent results with the same seed
      slotIndex - the index of the enchanting option
      bookshelfCount - the number of bookshelves
      stack - the item stack to enchant
      Returns:
      the required experience level for an enchanting option in the enchanting table's screen, or the enchantment screen
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Ljava/util/Random;IILamj;)I
      intermediary method_3521 Lnet/minecraft/class_1129;method_3521(Ljava/util/Random;IILnet/minecraft/class_1071;)I
      named calculateRequiredExperienceLevel Lnet/minecraft/enchantment/EnchantmentHelper;calculateRequiredExperienceLevel(Ljava/util/Random;IILnet/minecraft/item/ItemStack;)I
    • addRandomEnchantment

      public static ItemStack addRandomEnchantment(Random random, ItemStack stack, int int2)
      Mappings:
      Namespace Name Mixin selector
      official a Laph;a(Ljava/util/Random;Lamj;I)Lamj;
      intermediary method_6385 Lnet/minecraft/class_1129;method_6385(Ljava/util/Random;Lnet/minecraft/class_1071;I)Lnet/minecraft/class_1071;
      named addRandomEnchantment Lnet/minecraft/enchantment/EnchantmentHelper;addRandomEnchantment(Ljava/util/Random;Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/item/ItemStack;
    • getEnchantmentInfoEntries

      public static List getEnchantmentInfoEntries(Random random, ItemStack stack, int int2)
      Mappings:
      Namespace Name Mixin selector
      official b Laph;b(Ljava/util/Random;Lamj;I)Ljava/util/List;
      intermediary method_3529 Lnet/minecraft/class_1129;method_3529(Ljava/util/Random;Lnet/minecraft/class_1071;I)Ljava/util/List;
      named getEnchantmentInfoEntries Lnet/minecraft/enchantment/EnchantmentHelper;getEnchantmentInfoEntries(Ljava/util/Random;Lnet/minecraft/item/ItemStack;I)Ljava/util/List;
    • method_3528

      public static Map method_3528(int int2, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official b Laph;b(ILamj;)Ljava/util/Map;
      intermediary method_3528 Lnet/minecraft/class_1129;method_3528(ILnet/minecraft/class_1071;)Ljava/util/Map;
      named method_3528 Lnet/minecraft/enchantment/EnchantmentHelper;method_3528(ILnet/minecraft/item/ItemStack;)Ljava/util/Map;