diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-30 01:49:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-30 01:49:27 +0000 |
commit | 06e9c7742b1a94fbcc5965588171b26d7468f44c (patch) | |
tree | 1077f5026e6657beb849ae2b79c17137ad9ee32f /src/Java | |
parent | cc825179dce70a5f2c4a13730639e3300243e21a (diff) | |
parent | 848bf971ce31925e6711133c35cc7632cdc5ca34 (diff) | |
download | GT5-Unofficial-06e9c7742b1a94fbcc5965588171b26d7468f44c.tar.gz GT5-Unofficial-06e9c7742b1a94fbcc5965588171b26d7468f44c.tar.bz2 GT5-Unofficial-06e9c7742b1a94fbcc5965588171b26d7468f44c.zip |
Merge pull request #581 from botn365/amp-energy-fix
$ Fixes #456
Diffstat (limited to 'src/Java')
3 files changed, 19 insertions, 14 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index ee2bf6c940..9cf395a9bf 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -366,21 +366,9 @@ public class GTplusplus implements ActionListener { //Advanced Vacuum Freezer generation mOriginalCount[2] = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList.size(); for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sVacuumRecipes.mRecipeList) { - if (x != null && RecipeUtils.doesGregtechRecipeHaveEqualCells(x)) { - int mTime = (x.mDuration/2); - int len = x.mFluidInputs.length; - FluidStack[] y = new FluidStack[len + 1]; - int slot = y.length - 1; - int mr3 = 0; - for (FluidStack f : x.mFluidInputs) { - if (f != null) { - y[mr3] = f; - } - mr3++; - } - y[slot] = FluidUtils.getFluidStack("cryotheum", mTime); + if (x != null && RecipeUtils.doesGregtechRecipeHaveEqualCells(x)) { if (ItemUtils.checkForInvalidItems(x.mInputs, x.mOutputs)) { - if (CORE.RA.addAdvancedFreezerRecipe(x.mInputs, y, x.mFluidOutputs, x.mOutputs, x.mChances, x.mDuration, x.mEUt, x.mSpecialValue)) { + if (CORE.RA.addAdvancedFreezerRecipe(x.mInputs, x.mFluidInputs, x.mFluidOutputs, x.mOutputs, x.mChances, x.mDuration, x.mEUt, x.mSpecialValue)) { mValidCount[2]++; } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java index 064dc8372b..82de41f186 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java @@ -184,6 +184,8 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta return false; } + private volatile int mGraceTimer = 2; + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { /*if (this.getBaseMetaTileEntity().isActive()) { @@ -192,5 +194,19 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta } } */ super.onPostTick(aBaseMetaTileEntity, aTick); + + if (this.mStartUpCheck < 0) { + if (this.mMaxProgresstime > 0 && this.mProgresstime != 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { + if (aTick % 10 == 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { + if (!this.depleteInput(FluidUtils.getFluidStack("cryotheum", 10))) { + if (mGraceTimer-- == 0) { + this.causeMaintenanceIssue(); + this.stopMachine(); + mGraceTimer = 2; + } + } + } + } + } } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java index 71cb15474b..a2087c0891 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java @@ -422,6 +422,7 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase if (mGraceTimer-- == 0) { this.causeMaintenanceIssue(); this.stopMachine(); + mGraceTimer = 2; } } } |