From 6db18f05fee9692ec963f6aef728d5a283e28b93 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 29 Nov 2016 21:43:46 +0100 Subject: [PATCH] Supposedly fixed item pickup happening multiple times with other mods Closes #421 --- .../java/de/ellpeck/actuallyadditions/mod/items/ItemBag.java | 4 ++++ 1 file changed, 4 insertions(+) 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 8ef4fcda6..70a3be6a2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBag.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBag.java @@ -61,6 +61,10 @@ public class ItemBag extends ItemBase{ @SubscribeEvent public void onItemPickup(EntityItemPickupEvent event){ + if(event.isCanceled() || event.getResult() == Event.Result.ALLOW){ + return; + } + EntityPlayer player = event.getEntityPlayer(); EntityItem item = event.getItem(); if(item != null && !item.isDead){