From 4666f6d4eaa8967c5b6db7b3b45e5995b96c4b99 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 18 Nov 2016 20:52:33 +0100 Subject: [PATCH] Fixed the bag "leaking" items Closes #373 --- .../actuallyadditions/mod/items/ItemBag.java | 8 +++++++- .../textures/gui/guiInputter.png | Bin 3842 -> 4091 bytes 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBag.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBag.java index 44e442c9d..8ef4fcda6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBag.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBag.java @@ -126,7 +126,13 @@ public class ItemBag extends ItemBase{ } } } - item.setEntityItemStack(stack); + + if(!StackUtil.isValid(stack)){ + item.setDead(); + } + else{ + item.setEntityItemStack(stack); + } } } diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiInputter.png b/src/main/resources/assets/actuallyadditions/textures/gui/guiInputter.png index a5aadf9a0e5cb9ea7d369c7c11439b8d257b0e53..de4c657a4e0df6861858d3c69c8c8328e10fd83b 100644 GIT binary patch literal 4091 zcmeHKcT`hp7XJbaHkw#KLeaI(2t;b=iQov1fE^X-2mt~Kp|=zj!A2RGfiXy16=6^^ z7C@w_R0ktLnzT@b5UKns`4KkSh4*LOkl(J6f`4u!@6Kr=j6aa-H$q7rI zsuM!SEn(lD2|I!J4U6;)@d3e}{Zr92&Dt1>U5}zH|{n#g@Rv!7L!+ZG_?{lagn7_f!gn~O zu}N0f#(g_O7sqncOcXC1iCat~D6#ZJ_Pwm?H-eLC=$z*rg=Dd*G$6=7l}6Lk z;g1Wc$9obwi2dwxzA`%H!xKtnO`L3M%bqZ9DzDYz-FTznj)>_VBP~@qP-hg}4H)as z(EVDZ9!F>PJ&T!XNP>^pk^;C7l7;jX*feRL6IzSiXV{{2SJNA8Exr%|3bx%-vp`~S zM=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