From c24364a0faf2e9f578244db959a7be628443fbba Mon Sep 17 00:00:00 2001 From: malte0811 Date: Sat, 20 Jan 2024 14:27:05 +0100 Subject: [PATCH] Fix TagOutput::get for empty outputs --- .../immersiveengineering/api/crafting/TagOutput.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/api/java/blusunrize/immersiveengineering/api/crafting/TagOutput.java b/src/api/java/blusunrize/immersiveengineering/api/crafting/TagOutput.java index 036ee3cc06..66e817fa5b 100644 --- a/src/api/java/blusunrize/immersiveengineering/api/crafting/TagOutput.java +++ b/src/api/java/blusunrize/immersiveengineering/api/crafting/TagOutput.java @@ -68,7 +68,12 @@ public ItemStack get() { if(cachedStack==null) cachedStack = rawData.map( - iws -> IEApi.getPreferredStackbyMod(iws.getMatchingStacks()), + iws -> { + if(iws.basePredicate.isEmpty()) + return ItemStack.EMPTY; + else + return IEApi.getPreferredStackbyMod(iws.getMatchingStacks()); + }, Function.identity() ); return cachedStack;