diff options
author | Florexiz <florexiz.nm@gmail.com> | 2021-12-05 19:48:21 +0300 |
---|---|---|
committer | Florexiz <florexiz.nm@gmail.com> | 2021-12-05 19:48:21 +0300 |
commit | d88f9c35197b2229de1500d9c7be40645c1d77ab (patch) | |
tree | e78f55466a8151af6aac76c04312a76e9a9cb337 /src/Java | |
parent | 4e4078632f4ccbfa469a2506f4ecc056d3401f84 (diff) | |
download | GT5-Unofficial-d88f9c35197b2229de1500d9c7be40645c1d77ab.tar.gz GT5-Unofficial-d88f9c35197b2229de1500d9c7be40645c1d77ab.tar.bz2 GT5-Unofficial-d88f9c35197b2229de1500d9c7be40645c1d77ab.zip |
Made Zyngen check each bus individually
Diffstat (limited to 'src/Java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java | 22 |
1 files changed, 20 insertions, 2 deletions
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<ItemStack> 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 |