Skip to content

Commit

Permalink
reverted change due to NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
PrototypeTrousers committed Mar 31, 2021
1 parent 4110de6 commit cd3e063
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ protected void trySearchNewRecipe() {
long maxVoltage = getMaxVoltage();
Recipe currentRecipe = null;
IItemHandlerModifiable importInventory = getInputInventory();
IMultipleTankHandler importFluids = getInputTank();

//inverse of logic in normal AbstractRecipeLogic
//for MultiSmelter, we can reuse previous recipe if inputs didn't change
Expand All @@ -105,8 +106,8 @@ protected void trySearchNewRecipe() {
if (metaTileEntity.isInputsDirty()) {
metaTileEntity.setInputsDirty(false);
//Inputs changed, try searching new recipe for given inputs
currentRecipe = findRecipe(maxVoltage, importInventory, null);
} else if (previousRecipe != null && previousRecipe.matches(false, importInventory, null)) {
currentRecipe = findRecipe(maxVoltage, importInventory, importFluids);
} else if (previousRecipe != null && previousRecipe.matches(false, importInventory, importFluids)) {
//if previous recipe still matches inputs, try to use it
currentRecipe = previousRecipe;
}
Expand Down

0 comments on commit cd3e063

Please sign in to comment.