Fix item pickup dupe bugs. Closes #3015

This commit is contained in:
cpw 2016-06-23 17:49:50 -04:00
parent 90d6bad7f7
commit db9e75a273

View file

@ -1,13 +1,15 @@
--- ../src-base/minecraft/net/minecraft/entity/player/InventoryPlayer.java
+++ ../src-work/minecraft/net/minecraft/entity/player/InventoryPlayer.java
@@ -279,6 +279,7 @@
itemstack.func_77982_d(p_70452_1_.func_77978_p().func_74737_b());
}
@@ -272,7 +272,8 @@
if (itemstack == null)
{
- itemstack = new ItemStack(item, 0, p_70452_1_.func_77960_j());
+ itemstack = p_70452_1_.func_77946_l(); // Forge: Replace Item clone above to preserve item capabilities when picking the item up.
this.func_70299_a(j, itemstack);
}
+ itemstack.field_77994_a = 0;
if (p_70452_1_.func_77942_o())
{
@@ -344,6 +345,14 @@
}
}