From eca0391139bc65963a75c257b92338db254074c6 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Fri, 29 Sep 2017 15:47:17 +1000 Subject: ^ Version Bump. % Washplant change. --- ...GregtechMetaTileEntity_IndustrialWashPlant.java | 72 ++++++++++++++++++++-- 1 file changed, 68 insertions(+), 4 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java index 7352b5dfca..9dcd257944 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java @@ -101,33 +101,44 @@ extends GregtechMeta_MultiBlockBase { Utils.LOG_WARNING("Did not find enough cleaning solution."); return false; } + Utils.LOG_INFO("1"); - ArrayList tInputList = getStoredInputs(); + /*ArrayList tInputList = getStoredInputs(); ArrayList tFluidInputs = getStoredFluids(); for (ItemStack tInput : tInputList) { + Utils.LOG_INFO("2"); long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[] { (tFluidInputs.isEmpty()) ? null : (FluidStack) tFluidInputs.get(0) }, new ItemStack[] { tInput }); + + tRecipe = this.reduceRecipeTimeByPercentage(tRecipe, 60); + if (tRecipe != null) { + Utils.LOG_INFO("3"); this.mEfficiency = (10000 - ((getIdealStatus() - getRepairStatus()) * 1000)); this.mEfficiencyIncrease = 10000; this.mEUt = tRecipe.mEUt; if (tRecipe.mEUt <= 16) { + Utils.LOG_INFO("3.1"); this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1)); } else { + Utils.LOG_INFO("3.2"); this.mEUt = tRecipe.mEUt; this.mMaxProgresstime = tRecipe.mDuration; while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + Utils.LOG_INFO("3.3"); this.mEUt *= 4; this.mMaxProgresstime /= 2; } } + Utils.LOG_INFO("4"); if (this.mEUt > 0) { + Utils.LOG_INFO("4.1"); this.mEUt = (-this.mEUt); } this.mMaxProgresstime = (this.mMaxProgresstime * 2 / (1 + 3)); @@ -136,7 +147,7 @@ extends GregtechMeta_MultiBlockBase { //this.mOutputItems = new ItemStack[] { tRecipe.getOutput(0) }; ItemStack mNewOutputs[] = new ItemStack[tRecipe.mOutputs.length]; for (int f=0;f tInputList = getStoredInputs(); + ArrayList tFluidInputs = getStoredFluids(); + for (ItemStack tInput : tInputList) { + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.findRecipe(getBaseMetaTileEntity(), false, + gregtech.api.enums.GT_Values.V[tTier], + new FluidStack[] { (tFluidInputs.isEmpty()) ? null : (FluidStack) tFluidInputs.get(0) }, + new ItemStack[] { this.mInventory[1], tInput }); + if (tRecipe != null) { + if (tRecipe.isRecipeInputEqual(true, + new FluidStack[] { (tFluidInputs.isEmpty()) ? null : (FluidStack) tFluidInputs.get(0) }, + new ItemStack[] { tInput, this.mInventory[1] })) { + this.mEfficiency = (10000 - ((getIdealStatus() - getRepairStatus()) * 1000)); + this.mEfficiencyIncrease = 10000; + + this.mEUt = tRecipe.mEUt; + if (tRecipe.mEUt <= 16) { + this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1)); + } else { + this.mEUt = tRecipe.mEUt; + this.mMaxProgresstime = tRecipe.mDuration; + while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + } + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + this.mMaxProgresstime = (this.mMaxProgresstime * 2 / (1 + 5)); + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + if (tRecipe.mOutputs.length > 0){ + //this.mOutputItems = new ItemStack[] { tRecipe.getOutput(0) }; + ItemStack mNewOutputs[] = new ItemStack[tRecipe.mOutputs.length]; + for (int f=0;f 0) + this.mOutputFluids = new FluidStack[] { tRecipe.getFluidOutput(0) }; + updateSlots(); + return true; + } + } + } return false; } -- cgit