From e6b3c7ba64282e05ce68e1491bcdf0ff05764a95 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Thu, 18 Feb 2016 16:08:23 -0600 Subject: [PATCH] Preserve ItemStack Caps when picking Items up. --- .../entity/player/InventoryPlayer.java.patch | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch index ed4ba1122..f59794311 100644 --- a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch @@ -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); } }