Skip to content

Commit 05cf5e8

Browse files
Fix machines set to disable after current cycle not disabling on powerstall (#4215)
1 parent aaffe3d commit 05cf5e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/gregtechceu/gtceu/api/machine/trait/RecipeLogic.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ public void handleRecipeWorking() {
296296
if (machine.self() instanceof IMultiController && !preventPowerFail) {
297297
runAttempt = 0;
298298
setStatus(Status.SUSPEND);
299-
regressRecipe();
300299
}
301300
}
302301
runDelay = runAttempt * 60;
@@ -305,7 +304,7 @@ public void handleRecipeWorking() {
305304
} else {
306305
setWaiting(conditionResult.reason());
307306
}
308-
if (isWaiting()) {
307+
if (isWaiting() || isSuspend()) {
309308
regressRecipe();
310309
}
311310
}
@@ -394,7 +393,8 @@ public void setStatus(Status status) {
394393
if (this.status == Status.WORKING) {
395394
this.totalContinuousRunningTime = 0;
396395
}
397-
if (status == Status.SUSPEND && suspendAfterFinish) {
396+
if ((status == Status.WAITING || status == Status.SUSPEND) && suspendAfterFinish) {
397+
status = Status.SUSPEND;
398398
suspendAfterFinish = false;
399399
}
400400
machine.notifyStatusChanged(this.status, status);

0 commit comments

Comments
 (0)