Skip to content

Commit

Permalink
dual handler probably works now
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Apr 6, 2024
1 parent daf03db commit b58ef1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gregtech.api.capability.impl;

import gregtech.api.DualHandler;
import gregtech.api.GTValues;
import gregtech.api.capability.GregtechDataCodes;
import gregtech.api.capability.GregtechTileCapabilities;
Expand Down Expand Up @@ -547,7 +548,11 @@ protected Recipe findRecipe(long maxVoltage, IItemHandlerModifiable inputs, IMul
return null;
}

return map.findRecipe(maxVoltage, inputs, fluidInputs);
if (inputs instanceof DualHandler dualHandler) {
return map.findRecipe(maxVoltage, dualHandler, dualHandler);
} else {
return map.findRecipe(maxVoltage, inputs, fluidInputs);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtech/api/recipes/RecipeMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ amount, getMaxFluidOutputs()),

@Nullable
public Recipe findRecipe(long voltage, IItemHandlerModifiable inputs, IMultipleTankHandler fluidInputs) {
return this.findRecipe(voltage, GTUtility.itemHandlerToList(inputs), GTUtility.fluidHandlerToList(fluidInputs));
return findRecipe(voltage, GTUtility.itemHandlerToList(inputs), GTUtility.fluidHandlerToList(fluidInputs));
}

/**
Expand Down

0 comments on commit b58ef1c

Please sign in to comment.