aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-09-29 15:47:17 +1000
committerAlkalus <draknyte1@hotmail.com>2017-09-29 15:47:17 +1000
commiteca0391139bc65963a75c257b92338db254074c6 (patch)
tree129cb85cdb1ed381d45e41eb9eb2ed4c57e80cf4 /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities
parentbc69aeb6203d3c9d667fe49807d8429df04aa7c9 (diff)
downloadGT5-Unofficial-eca0391139bc65963a75c257b92338db254074c6.tar.gz
GT5-Unofficial-eca0391139bc65963a75c257b92338db254074c6.tar.bz2
GT5-Unofficial-eca0391139bc65963a75c257b92338db254074c6.zip
^ Version Bump.
% Washplant change.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java72
1 files changed, 68 insertions, 4 deletions
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<ItemStack> tInputList = getStoredInputs();
+ /*ArrayList<ItemStack> tInputList = getStoredInputs();
ArrayList<FluidStack> 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<tRecipe.mOutputs.length;f++){
- Utils.LOG_WARNING("Step 5 - Adding Output");
+ Utils.LOG_INFO("Step 5 - Adding Output");
mNewOutputs[f] = tRecipe.mOutputs[f].copy();
}
this.mOutputItems = mNewOutputs;
@@ -146,16 +157,69 @@ extends GregtechMeta_MultiBlockBase {
//this.mOutputFluids = new FluidStack[] { tRecipe.getFluidOutput(0) };
FluidStack outputFluids[] = new FluidStack[1];
if (true){
- Utils.LOG_WARNING("Adding Sludge");
- outputFluids[0] = FluidUtils.getFluidStack("fluid.sludge", 100);
+ Utils.LOG_INFO("Adding Sludge");
+ outputFluids[0] = FluidUtils.getFluidStack("potion.poison", 10);
}
this.mOutputFluids = outputFluids;
updateSlots();
}
updateSlots();
+ Utils.LOG_INFO("5");
return true;
}
}
+ return false;*/
+
+ ArrayList<ItemStack> tInputList = getStoredInputs();
+ ArrayList<FluidStack> 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<tRecipe.mOutputs.length;f++){
+ Utils.LOG_INFO("Step 5 - Adding Output");
+ mNewOutputs[f] = tRecipe.mOutputs[f].copy();
+ }
+ this.mOutputItems = mNewOutputs;
+ updateSlots();
+ }
+ if (tRecipe.mFluidOutputs.length > 0)
+ this.mOutputFluids = new FluidStack[] { tRecipe.getFluidOutput(0) };
+ updateSlots();
+ return true;
+ }
+ }
+ }
return false;
}