aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2017-08-23 14:01:36 +0200
committerTechnus <daniel112092@gmail.com>2017-08-23 14:01:36 +0200
commit52d6696c12a38cde0dedbc25f591c1c35ea0c4c3 (patch)
treef983a93e78b0715413c5eca9b9d8790816ba52dd
parenta1c3a4401f3e0ec71f8db0d6bee7433e8b24b244 (diff)
downloadGT5-Unofficial-52d6696c12a38cde0dedbc25f591c1c35ea0c4c3.tar.gz
GT5-Unofficial-52d6696c12a38cde0dedbc25f591c1c35ea0c4c3.tar.bz2
GT5-Unofficial-52d6696c12a38cde0dedbc25f591c1c35ea0c4c3.zip
Minor commentary change
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java15
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;