Preserve ItemStack Caps when picking Items up.

This commit is contained in:
AlgorithmX2 2016-02-18 16:08:23 -06:00
parent 741fdd0a85
commit e6b3c7ba64

View file

@ -1,6 +1,21 @@
--- ../src-base/minecraft/net/minecraft/entity/player/InventoryPlayer.java
+++ ../src-work/minecraft/net/minecraft/entity/player/InventoryPlayer.java
@@ -315,6 +315,14 @@
@@ -272,12 +272,8 @@
{
if (this.field_70462_a[j] == null)
{
- this.field_70462_a[j] = new ItemStack(item, 0, p_70452_1_.func_77960_j());
-
- if (p_70452_1_.func_77942_o())
- {
- this.field_70462_a[j].func_77982_d((NBTTagCompound)p_70452_1_.func_77978_p().func_74737_b());
- }
+ this.field_70462_a[j] = p_70452_1_.func_77946_l(); // Forge: Replace Item clone above to preserve item capabilities when picking the item up.
+ this.field_70462_a[j].field_77994_a = 0;
}
int k = i;
@@ -315,6 +311,14 @@
this.field_70462_a[i].func_77945_a(this.field_70458_d.field_70170_p, this.field_70458_d, i, this.field_70461_c == i);
}
}