Supposedly fixed item pickup happening multiple times with other mods

Closes #421
This commit is contained in:
Ellpeck 2016-11-29 21:43:46 +01:00
parent 79f9eee9c0
commit 6db18f05fe

View file

@ -61,6 +61,10 @@ public class ItemBag extends ItemBase{
@SubscribeEvent @SubscribeEvent
public void onItemPickup(EntityItemPickupEvent event){ public void onItemPickup(EntityItemPickupEvent event){
if(event.isCanceled() || event.getResult() == Event.Result.ALLOW){
return;
}
EntityPlayer player = event.getEntityPlayer(); EntityPlayer player = event.getEntityPlayer();
EntityItem item = event.getItem(); EntityItem item = event.getItem();
if(item != null && !item.isDead){ if(item != null && !item.isDead){