From c55fb25459b20401f9526464e91382d1e6b08f50 Mon Sep 17 00:00:00 2001 From: Ghzdude <44148655+ghzdude@users.noreply.github.com> Date: Sun, 9 Jun 2024 12:28:25 -0700 Subject: [PATCH] small fixes --- .../common/metatileentities/storage/CraftingRecipeLogic.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/metatileentities/storage/CraftingRecipeLogic.java b/src/main/java/gregtech/common/metatileentities/storage/CraftingRecipeLogic.java index eb2a05c8ffe..74879978f26 100644 --- a/src/main/java/gregtech/common/metatileentities/storage/CraftingRecipeLogic.java +++ b/src/main/java/gregtech/common/metatileentities/storage/CraftingRecipeLogic.java @@ -226,7 +226,7 @@ public ItemStack findSubstitute(int craftingIndex, ItemStack stack) { // iterate stored items to find equivalent for (int i = 0; i < this.availableHandlers.getSlots(); i++) { var itemStack = availableHandlers.getStackInSlot(i); - if (itemStack.isEmpty()) continue; + if (itemStack.isEmpty() || this.strategy.equals(itemStack, stack)) continue; var recipe = getCachedRecipe(); @@ -268,6 +268,7 @@ public ItemStack findSubstitute(int craftingIndex, ItemStack stack) { ItemStack.areItemStacksEqual(newResult, previousResult)) || recipe instanceof ShapedOreEnergyTransferRecipe) { // ingredient matched, return the substitute + craftingMatrix.setInventorySlotContents(craftingIndex, stack); map.put(itemStack.copy(), true); substitute = itemStack; break;