Class EnchantmentHelper


  • public class EnchantmentHelper
    extends java.lang.Object
    • Constructor Detail

      • EnchantmentHelper

        public EnchantmentHelper()
    • Method Detail

      • getItemEnchantmentLevel

        public static int getItemEnchantmentLevel​(Enchantment p_77506_0_,
                                                  ItemStack p_77506_1_)
      • getEnchantments

        public static java.util.Map<Enchantment,​java.lang.Integer> getEnchantments​(ItemStack p_82781_0_)
      • deserializeEnchantments

        public static java.util.Map<Enchantment,​java.lang.Integer> deserializeEnchantments​(ListNBT p_226652_0_)
      • setEnchantments

        public static void setEnchantments​(java.util.Map<Enchantment,​java.lang.Integer> p_82782_0_,
                                           ItemStack p_82782_1_)
      • getDamageProtection

        public static int getDamageProtection​(java.lang.Iterable<ItemStack> p_77508_0_,
                                              DamageSource p_77508_1_)
      • getSweepingDamageRatio

        public static float getSweepingDamageRatio​(LivingEntity p_191527_0_)
      • doPostHurtEffects

        public static void doPostHurtEffects​(LivingEntity p_151384_0_,
                                             Entity p_151384_1_)
      • doPostDamageEffects

        public static void doPostDamageEffects​(LivingEntity p_151385_0_,
                                               Entity p_151385_1_)
      • getEnchantmentLevel

        public static int getEnchantmentLevel​(Enchantment p_185284_0_,
                                              LivingEntity p_185284_1_)
      • getKnockbackBonus

        public static int getKnockbackBonus​(LivingEntity p_77501_0_)
      • getFireAspect

        public static int getFireAspect​(LivingEntity p_90036_0_)
      • getRespiration

        public static int getRespiration​(LivingEntity p_185292_0_)
      • getDepthStrider

        public static int getDepthStrider​(LivingEntity p_185294_0_)
      • getBlockEfficiency

        public static int getBlockEfficiency​(LivingEntity p_185293_0_)
      • getFishingLuckBonus

        public static int getFishingLuckBonus​(ItemStack p_191529_0_)
      • getFishingSpeedBonus

        public static int getFishingSpeedBonus​(ItemStack p_191528_0_)
      • getMobLooting

        public static int getMobLooting​(LivingEntity p_185283_0_)
      • hasAquaAffinity

        public static boolean hasAquaAffinity​(LivingEntity p_185287_0_)
      • hasFrostWalker

        public static boolean hasFrostWalker​(LivingEntity p_189869_0_)
      • hasSoulSpeed

        public static boolean hasSoulSpeed​(LivingEntity p_234846_0_)
      • hasBindingCurse

        public static boolean hasBindingCurse​(ItemStack p_190938_0_)
      • hasVanishingCurse

        public static boolean hasVanishingCurse​(ItemStack p_190939_0_)
      • getLoyalty

        public static int getLoyalty​(ItemStack p_203191_0_)
      • getRiptide

        public static int getRiptide​(ItemStack p_203190_0_)
      • hasChanneling

        public static boolean hasChanneling​(ItemStack p_203192_0_)
      • getEnchantmentCost

        public static int getEnchantmentCost​(java.util.Random p_77514_0_,
                                             int p_77514_1_,
                                             int p_77514_2_,
                                             ItemStack p_77514_3_)
      • enchantItem

        public static ItemStack enchantItem​(java.util.Random p_77504_0_,
                                            ItemStack p_77504_1_,
                                            int p_77504_2_,
                                            boolean p_77504_3_)
      • selectEnchantment

        public static java.util.List<EnchantmentData> selectEnchantment​(java.util.Random p_77513_0_,
                                                                        ItemStack p_77513_1_,
                                                                        int p_77513_2_,
                                                                        boolean p_77513_3_)
      • filterCompatibleEnchantments

        public static void filterCompatibleEnchantments​(java.util.List<EnchantmentData> p_185282_0_,
                                                        EnchantmentData p_185282_1_)
      • isEnchantmentCompatible

        public static boolean isEnchantmentCompatible​(java.util.Collection<Enchantment> p_201840_0_,
                                                      Enchantment p_201840_1_)
      • getAvailableEnchantmentResults

        public static java.util.List<EnchantmentData> getAvailableEnchantmentResults​(int p_185291_0_,
                                                                                     ItemStack p_185291_1_,
                                                                                     boolean p_185291_2_)