do not capture extraction when item is empty
@@ -134,7 +134,9 @@ private static ItemStack onPullItemOut(IItemHandler handler, int slot, int amoun
Object inv = getItemHandler(dest, EnumFacing.UP).getValue();
ItemStack origin = handler.getStackInSlot(slot).copy(); // Capture Origin
ItemStack result = handler.extractItem(slot, amount, simulate);
+ if (!result.isEmpty()) {
SpongeCommonEventFactory.captureTransaction(InventoryUtil.forCapture(dest), InventoryUtil.toInventory(inv, handler), slot, origin);
+ }
return result;
}
return handler.extractItem(slot, amount, simulate);
