diff options
author | Alkalus <Draknyte1@hotmail.com> | 2020-03-28 02:28:12 +0000 |
---|---|---|
committer | Alkalus <Draknyte1@hotmail.com> | 2020-03-28 02:28:12 +0000 |
commit | a720412ba33403dcb09abc79c20e8126e3f8f7a6 (patch) | |
tree | 6a6a94e0f96b9fb384b06cfc897923086d7e9a9b | |
parent | f39e8134fcef5da8bd04503c5233b2b6de249b3a (diff) | |
download | GT5-Unofficial-a720412ba33403dcb09abc79c20e8126e3f8f7a6.tar.gz GT5-Unofficial-a720412ba33403dcb09abc79c20e8126e3f8f7a6.tar.bz2 GT5-Unofficial-a720412ba33403dcb09abc79c20e8126e3f8f7a6.zip |
$ Fixed Distillus handling for Distillery recipe handling.
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java index 7471963eac..753132dd27 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java @@ -193,32 +193,38 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M } @Override - public boolean checkRecipe(final ItemStack aStack) { - for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { - ArrayList<ItemStack> tBusItems = new ArrayList<ItemStack>(); - tBus.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tBus)) { - for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) - tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); - } - } - ItemStack[] inputs = new ItemStack[tBusItems.size()]; - int slot = 0; - for (ItemStack g : tBusItems) { - inputs[slot++] = g; - } - if (inputs.length > 0) { - int para = (4* GT_Utility.getTier(this.getMaxInputVoltage())); - log("Recipe. ["+inputs.length+"]["+para+"]"); - if (checkRecipeGeneric(inputs, new FluidStack[]{}, para, 100, 250, 10000)) { - log("Recipe 2."); - return true; - } - } + public boolean checkRecipe(final ItemStack aStack) { + // Run standard recipe handling for distillery recipes + if (mMode == 1) { + return this.checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 100); + } + else { + for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) { + ArrayList<ItemStack> tBusItems = new ArrayList<ItemStack>(); + tBus.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tBus)) { + for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { + if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) + tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); + } + } + ItemStack[] inputs = new ItemStack[tBusItems.size()]; + int slot = 0; + for (ItemStack g : tBusItems) { + inputs[slot++] = g; + } + if (inputs.length > 0) { + int para = (4* GT_Utility.getTier(this.getMaxInputVoltage())); + log("Recipe. ["+inputs.length+"]["+para+"]"); + if (checkRecipeGeneric(inputs, new FluidStack[]{}, para, 100, 250, 10000)) { + log("Recipe 2."); + return true; + } + } + } + return false; } - return false; } @Override |