diff options
author | HoleFish <48403212+HoleFish@users.noreply.github.com> | 2024-08-31 01:48:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 17:48:23 +0000 |
commit | 9fee35c065e197199f57ef1df31ac303e94d1d50 (patch) | |
tree | 66437da0c2422d10ddfc9211040ebbd180af5f54 /src/main/java/gtPlusPlus | |
parent | 55ebcb3bdf0f54b76642c03b3a58112081138c10 (diff) | |
download | GT5-Unofficial-9fee35c065e197199f57ef1df31ac303e94d1d50.tar.gz GT5-Unofficial-9fee35c065e197199f57ef1df31ac303e94d1d50.tar.bz2 GT5-Unofficial-9fee35c065e197199f57ef1df31ac303e94d1d50.zip |
Add duration since last shutdown (#2977)
* machine message
* fix & prass channel
* machine message
* fix & prass channel
* fix machines that dont use regular onPostTick
* follow error fixes and fix hatch check
* oops
* sa
---------
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gtPlusPlus')
3 files changed, 0 insertions, 42 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 491f696c43..1417f53c01 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -102,7 +102,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true; public GT_Recipe mLastRecipe; - protected long mTotalRunTime = 0; /** * Don't use this for recipe input check, otherwise you'll get duplicated fluids @@ -129,10 +128,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex return (tStackSize + tMaxStackSize - 1) / tMaxStackSize; } - public long getTotalRuntimeInTicks() { - return this.mTotalRunTime; - } - public abstract String getMachineType(); public String getMachineTooltip() { @@ -425,29 +420,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex } @Override - public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { - - // Time Counter - if (aBaseMetaTileEntity.isServerSide()) { - this.mTotalRunTime++; - } - - if (aBaseMetaTileEntity.isServerSide()) { - if (this.mUpdate == 1 || this.mStartUpCheck == 1) { - this.mChargeHatches.clear(); - this.mDischargeHatches.clear(); - this.mAirIntakes.clear(); - this.mTecTechEnergyHatches.clear(); - this.mTecTechDynamoHatches.clear(); - this.mAllEnergyHatches.clear(); - this.mAllDynamoHatches.clear(); - } - } - - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override public void explodeMultiblock() { MetaTileEntity tTileEntity; for (final Iterator<GT_MetaTileEntity_Hatch_InputBattery> localIterator = this.mChargeHatches @@ -1042,15 +1014,8 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex } @Override - public void saveNBTData(NBTTagCompound aNBT) { - aNBT.setLong("mTotalRunTime", this.mTotalRunTime); - super.saveNBTData(aNBT); - } - - @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - this.mTotalRunTime = aNBT.getLong("mTotalRunTime"); if (aNBT.hasKey("mVoidExcess")) { // backward compatibility voidingMode = aNBT.getBoolean("mVoidExcess") ? VoidingMode.VOID_ALL : VoidingMode.VOID_NONE; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java index 17e1093b71..7e5200e16c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java @@ -319,11 +319,6 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt } @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - } - - @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPreTick(aBaseMetaTileEntity, aTick); // Silly Client Syncing diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java index 0270dfea37..13bef7c885 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java @@ -517,7 +517,6 @@ public class GregtechMetaTileEntity_PowerSubStationController extends aNBT.setLong("mTotalEnergyAdded", this.mTotalEnergyAdded); aNBT.setLong("mTotalEnergyLost", this.mTotalEnergyLost); aNBT.setLong("mTotalEnergyConsumed", this.mTotalEnergyConsumed); - aNBT.setLong("mTotalRunTime", this.mTotalRunTime); aNBT.setBoolean("mIsOutputtingPower", this.mIsOutputtingPower); aNBT.setLong("mBatteryCapacity", this.mBatteryCapacity); super.saveNBTData(aNBT); @@ -543,7 +542,6 @@ public class GregtechMetaTileEntity_PowerSubStationController extends this.mTotalEnergyAdded = aNBT.getLong("mTotalEnergyAdded"); this.mTotalEnergyLost = aNBT.getLong("mTotalEnergyLost"); this.mTotalEnergyConsumed = aNBT.getLong("mTotalEnergyConsumed"); - this.mTotalRunTime = aNBT.getLong("mTotalRunTime"); this.mIsOutputtingPower = aNBT.getBoolean("mIsOutputtingPower"); |