From e2342c38eb5ac57bf28928ec21ab0a99eb8409e7 Mon Sep 17 00:00:00 2001 From: Kyle Einstein Date: Mon, 23 Apr 2018 08:33:29 -0400 Subject: [PATCH] Fix Two Player Duplication Bug --- .../Objects/SlimefunItem/abstractItems/AContainer.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/abstractItems/AContainer.java b/src/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/abstractItems/AContainer.java index 76475f53a..7dbf3116b 100644 --- a/src/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/abstractItems/AContainer.java +++ b/src/me/mrCookieSlime/Slimefun/Objects/SlimefunItem/abstractItems/AContainer.java @@ -84,10 +84,16 @@ public abstract class AContainer extends SlimefunItem { BlockMenu inv = BlockStorage.getInventory(b); if (inv != null) { for (int slot: getInputSlots()) { - if (inv.getItemInSlot(slot) != null) b.getWorld().dropItemNaturally(b.getLocation(), inv.getItemInSlot(slot)); + if (inv.getItemInSlot(slot) != null) { + b.getWorld().dropItemNaturally(b.getLocation(), inv.getItemInSlot(slot)); + inv.toInventory().clear(slot); + } } for (int slot: getOutputSlots()) { - if (inv.getItemInSlot(slot) != null) b.getWorld().dropItemNaturally(b.getLocation(), inv.getItemInSlot(slot)); + if (inv.getItemInSlot(slot) != null) { + b.getWorld().dropItemNaturally(b.getLocation(), inv.getItemInSlot(slot)); + inv.toInventory().clear(slot); + } } } progress.remove(b);