39 lines
1.7 KiB
Diff
39 lines
1.7 KiB
Diff
--- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
|
|
+++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
|
|
@@ -292,7 +292,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)
|
|
{
|
|
@@ -339,7 +339,7 @@
|
|
{
|
|
List<EnchantmentData> list = Lists.<EnchantmentData>newArrayList();
|
|
Item item = p_77513_1_.func_77973_b();
|
|
- int i = item.func_77619_b();
|
|
+ int i = item.getItemEnchantability(p_77513_1_);
|
|
|
|
if (i <= 0)
|
|
{
|
|
@@ -380,7 +380,8 @@
|
|
|
|
while (iterator.hasNext())
|
|
{
|
|
- if (!p_185282_1_.field_76302_b.func_77326_a(((EnchantmentData)iterator.next()).field_76302_b))
|
|
+ Enchantment e2 = iterator.next().field_76302_b;
|
|
+ if (!p_185282_1_.field_76302_b.func_77326_a(e2) || !e2.func_77326_a(p_185282_1_.field_76302_b)) //Forge BugFix: Let Both enchantments veto being together
|
|
{
|
|
iterator.remove();
|
|
}
|
|
@@ -395,7 +396,7 @@
|
|
|
|
for (Enchantment enchantment : Enchantment.field_185264_b)
|
|
{
|
|
- if ((!enchantment.func_185261_e() || p_185291_2_) && (enchantment.field_77351_y.func_77557_a(item) || flag))
|
|
+ if ((!enchantment.func_185261_e() || p_185291_2_) && (enchantment.canApplyAtEnchantingTable(p_185291_1_) || (flag && enchantment.isAllowedOnBooks())))
|
|
{
|
|
for (int i = enchantment.func_77325_b(); i > enchantment.func_77319_d() - 1; --i)
|
|
{
|