<commit_before>--- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
@@ -296,7 +296,7 @@
     public static int func_77514_a(Random p_77514_0_, int p_77514_1_, int p_77514_2_, ItemStack p_77514_3_)
     {
         Item item = p_77514_3_.func_77973_b();
-        int i = item.func_77619_b();
+        int i = item.getItemEnchantability(p_77514_3_);
 
         if (i <= 0)
         {
@@ -345,7 +345,7 @@
     public static List<EnchantmentData> func_77513_b(Random p_77513_0_, ItemStack p_77513_1_, int p_77513_2_)
     {
         Item item = p_77513_1_.func_77973_b();
-        int i = item.func_77619_b();
+        int i = item.getItemEnchantability(p_77513_1_);
 
         if (i <= 0)
         {
@@ -387,7 +387,9 @@
 
                             for (EnchantmentData enchantmentdata1 : list)
                             {
-                                if (!enchantmentdata1.field_76302_b.func_77326_a(Enchantment.func_180306_c(integer.intValue())))
+                                Enchantment e1 = enchantmentdata1.field_76302_b;
+                                Enchantment e2 = Enchantment.func_180306_c(integer.intValue());
+                                if (e1.func_77326_a(e2) && e2.func_77326_a(e1)) //Forge BugFix: Let Both enchantments veto being together
                                 {
                                     flag = false;<commit_msg>Fix enchanting applying the same enchantment multiple times. Closes #2273<commit_after>--- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
@@ -296,7 +296,7 @@
     public static int func_77514_a(Random p_77514_0_, int p_77514_1_, int p_77514_2_, ItemStack p_77514_3_)
     {
         Item item = p_77514_3_.func_77973_b();
-        int i = item.func_77619_b();
+        int i = item.getItemEnchantability(p_77514_3_);
 
         if (i <= 0)
         {
@@ -345,7 +345,7 @@
     public static List<EnchantmentData> func_77513_b(Random p_77513_0_, ItemStack p_77513_1_, int p_77513_2_)
     {
         Item item = p_77513_1_.func_77973_b();
-        int i = item.func_77619_b();
+        int i = item.getItemEnchantability(p_77513_1_);
 
         if (i <= 0)
         {
@@ -387,7 +387,9 @@
 
                             for (EnchantmentData enchantmentdata1 : list)
                             {
-                                if (!enchantmentdata1.field_76302_b.func_77326_a(Enchantment.func_180306_c(integer.intValue())))
+                                Enchantment e1 = enchantmentdata1.field_76302_b;
+                                Enchantment e2 = Enchantment.func_180306_c(integer.intValue());
+                                if (!e1.func_77326_a(e2) || !e2.func_77326_a(e1)) //Forge BugFix: Let Both enchantments veto being together
                                 {
                                     flag = false;
{'fraction_non_alphanumeric': 0.10688042752171009, 'fraction_numerical': 0.11356045424181696, 'mean_word_length': 1.8660287081339713, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1090521', 'n_tokens_mistral': 1195, 'n_tokens_neox': 993, 'n_words': 164}