diff options
author | Technus <daniel112092@gmail.com> | 2017-08-23 14:01:36 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2017-08-23 14:02:01 +0200 |
commit | cdc349f8d7f95e469959ec20b5f9d3e78d418038 (patch) | |
tree | 33b7395574c6343eb42449238a577de151b42f7f /src/main | |
parent | 6c64d190065bb4f57a3e18a174a2dc556b21f15d (diff) | |
download | GT5-Unofficial-cdc349f8d7f95e469959ec20b5f9d3e78d418038.tar.gz GT5-Unofficial-cdc349f8d7f95e469959ec20b5f9d3e78d418038.tar.bz2 GT5-Unofficial-cdc349f8d7f95e469959ec20b5f9d3e78d418038.zip |
Minor commentary change
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java index 9cce5dbc81..589752c176 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java @@ -121,7 +121,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt protected void extraExplosions_EM() { }//For that extra hatches explosions, and maybe some MOORE EXPLOSIONS - protected void workGotDisabled_EM(){} + protected void workGotDisabled_EM(){}//called at end of onPostTick //callback on enable/disable work, they don't care if the multiblock is complete or not //(you can check that with looking at mMachine and other variables) @@ -157,7 +157,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt return 0; } - //Override but usually call super method at start! + //Override if needed but usually call super method at start! + //On machine stop - NOT called when softhammered to offline state! - it SHOULD cause a full stop like power failure does + //Can be overriden to alter stopping behaviour, to do things on soft hammer scenario -> workGotDisabled_EM @Override public void stopMachine() { mOutputItems = null; @@ -186,7 +188,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt outputEM = null; hatchesStatusUpdate_EM(); - }//On machine stop - now called when softhammered to offline state! - it does not cause a full stop like power failure + } //RATHER LEAVE ALONE Section @@ -411,9 +413,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (aBaseMetaTileEntity.isServerSide()) { if (mEfficiency < 0) mEfficiency = 0; - if (previousTickValueForWorkEnabled && !getBaseMetaTileEntity().isAllowedToWork()) workGotDisabled_EM(); - previousTickValueForWorkEnabled = getBaseMetaTileEntity().isAllowedToWork();//Assign new value - if (--mUpdate == 0 || --mStartUpCheck == 0 || cyclicUpdate() || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) { mInputHatches.clear(); mInputBusses.clear(); @@ -681,6 +680,10 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt stopMachine(); } } + + if (previousTickValueForWorkEnabled && !getBaseMetaTileEntity().isAllowedToWork()) workGotDisabled_EM(); + previousTickValueForWorkEnabled = getBaseMetaTileEntity().isAllowedToWork();//Assign new value + aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & -512) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64) | ((eCertainStatus == 0) ? 0 : 128) | (eParameters ? 0 : 256)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); boolean active = aBaseMetaTileEntity.isActive() && mPollution > 0; |