@@ -142,7 +142,9 @@ protected Recipe findRecipe(long maxVoltage,
142142 /* Iterate over the input items looking for more things to add until we run either out of input items
143143 * or we have exceeded the number of items permissible from the smelting bonus
144144 */
145- this .invalidInputsForRecipes = true ;
145+ boolean matchedRecipe = false ;
146+ boolean canFitOutputs = true ;
147+
146148 for (int index = 0 ; index < inputs .getSlots () && currentItemsEngaged < maxItemsLimit ; index ++) {
147149
148150 // Skip this slot if it is empty.
@@ -157,7 +159,7 @@ protected Recipe findRecipe(long maxVoltage,
157159 CountableIngredient inputIngredient ;
158160 if (matchingRecipe != null ) {
159161 inputIngredient = matchingRecipe .getInputs ().get (0 );
160- this . invalidInputsForRecipes = false ;
162+ matchedRecipe = true ;
161163 }
162164 else
163165 continue ;
@@ -185,7 +187,7 @@ protected Recipe findRecipe(long maxVoltage,
185187 computeOutputItemStacks (temp , matchingRecipe .getOutputs ().get (0 ), recipeMultiplier );
186188
187189 // determine if there is enough room in the output to fit all of this
188- boolean canFitOutputs = InventoryUtils .simulateItemStackMerge (temp , this .getOutputInventory ());
190+ canFitOutputs = InventoryUtils .simulateItemStackMerge (temp , this .getOutputInventory ());
189191
190192 // if there isn't, we can't process this recipe.
191193 if (!canFitOutputs )
@@ -203,13 +205,10 @@ protected Recipe findRecipe(long maxVoltage,
203205 }
204206 }
205207
206- // If there were no accepted ingredients, then there is no recipe to process.
207- // the output may be filled up
208- if (recipeInputs .isEmpty () && !invalidInputsForRecipes ) {
209- //Set here to prevent recipe deadlock on world load with full output bus
210- this .isOutputsFull = true ;
211- return null ;
212- } else if (recipeInputs .isEmpty ()) {
208+ this .invalidInputsForRecipes = !matchedRecipe ;
209+ this .isOutputsFull = !canFitOutputs ;
210+
211+ if (recipeInputs .isEmpty ()) {
213212 return null ;
214213 }
215214
0 commit comments