From f8180ee91d92779f6ca600327e06d74f7a51997f Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Thu, 19 May 2022 21:18:21 +0200 Subject: [PATCH] Smarter funnel extraction - Funnels will no longer deadlock their extraction size if the first item of an inventory has a low max stack size but can't even be extracted because of filtering. - fixes #2919 --- .../java/com/simibubi/create/foundation/item/ItemHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java b/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java index 995a0eebc..b2a454fb8 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemHelper.java @@ -229,7 +229,7 @@ public class ItemHelper { for (int slot = 0; slot < inv.getSlots(); slot++) { if (extracting.isEmpty()) { ItemStack stackInSlot = inv.getStackInSlot(slot); - if (stackInSlot.isEmpty()) + if (stackInSlot.isEmpty() || !test.test(stackInSlot)) continue; int maxExtractionCountForItem = amountFunction.apply(stackInSlot); if (maxExtractionCountForItem == 0)