From b58ef1c9b0c0d32e45990e0e1466279aa5ae5ad1 Mon Sep 17 00:00:00 2001 From: Ghzdude <44148655+ghzdude@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:46:21 -0700 Subject: [PATCH] dual handler probably works now --- .../gregtech/api/capability/impl/AbstractRecipeLogic.java | 7 ++++++- src/main/java/gregtech/api/recipes/RecipeMap.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java b/src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java index 6d8877ff1dc..589a79656d5 100644 --- a/src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java +++ b/src/main/java/gregtech/api/capability/impl/AbstractRecipeLogic.java @@ -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; @@ -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); + } } /** diff --git a/src/main/java/gregtech/api/recipes/RecipeMap.java b/src/main/java/gregtech/api/recipes/RecipeMap.java index 9743c549ae5..a0086831503 100644 --- a/src/main/java/gregtech/api/recipes/RecipeMap.java +++ b/src/main/java/gregtech/api/recipes/RecipeMap.java @@ -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)); } /**