From d9f4fafcc9a170452a7fda96f8d3ea6df1adf736 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Sat, 13 May 2023 10:11:10 +0200 Subject: [PATCH] Fix rare crash with reusable ingredients, Closes #94 --- .../org/cyclops/integratedcrafting/core/CraftingHelpers.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/cyclops/integratedcrafting/core/CraftingHelpers.java b/src/main/java/org/cyclops/integratedcrafting/core/CraftingHelpers.java index 31c843ff..3850e7f2 100644 --- a/src/main/java/org/cyclops/integratedcrafting/core/CraftingHelpers.java +++ b/src/main/java/org/cyclops/integratedcrafting/core/CraftingHelpers.java @@ -1049,6 +1049,7 @@ public static List getIngredientRecipeInputs(IIngredientComponentStora long prototypeQuantity = matcher.getQuantity(inputPrototype.getPrototype()); if (inputReusable && extractionMemoryReusable.contains(inputPrototype.getPrototype())) { // If the reusable item has been extracted before, mark as valid, and don't extract again. + inputInstance = inputPrototype.getComponent().getMatcher().getEmptyInstance(); hasInputInstance = true; shouldBreak = true; } else { @@ -1097,6 +1098,7 @@ public static List getIngredientRecipeInputs(IIngredientComponentStora if (inputReusable) { extractionMemoryReusableBuffer.add(inputPrototype.getPrototype()); } + inputInstance = inputPrototype.getComponent().getMatcher().getEmptyInstance(); hasInputInstance = true; shouldBreak = true; }