From d88f9c35197b2229de1500d9c7be40645c1d77ab Mon Sep 17 00:00:00 2001 From: Florexiz Date: Sun, 5 Dec 2021 19:48:21 +0300 Subject: Made Zyngen check each bus individually --- ...gtechMetaTileEntity_IndustrialAlloySmelter.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/Java') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java index 0d11fcd0ce..4c76b6dcf0 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java @@ -220,9 +220,27 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_ return 100; } + + @Override public boolean checkRecipe(ItemStack aStack) { - return checkRecipeGeneric(this.getMaxParallelRecipes(), 100, 5 * this.mLevel); // Will have to clone the logic from parent class to handle heating coil - // tiers. + FluidStack[] tFluids = getStoredFluids().toArray(new FluidStack[0]); + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList tInputs = new ArrayList<>(); + if (isValidMetaTileEntity(tBus)) { + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) { + tInputs.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + } + if (tInputs.size() > 1) { + ItemStack[] tItems = tInputs.toArray(new ItemStack[0]); + if (checkRecipeGeneric(tItems, tFluids, getMaxParallelRecipes(), 100, 5 * this.mLevel, 10000)) { + return true; + } + } + } + return false; } @Override -- cgit