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/gtPlusPlus/xmod/gregtech/common | |
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/gtPlusPlus/xmod/gregtech/common')
2 files changed, 17 insertions, 0 deletions
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; } } } |