Fix endless while loop when machine can't finish work without idle reason
This commit is contained in:
parent
0b3a9221f7
commit
7a0d7d668a
@ -245,7 +245,7 @@ abstract class MatteryWorkerBlockEntity<JobType : MatteryWorkerBlockEntity.Job>(
|
||||
|
||||
var availableTicks = 1.0
|
||||
|
||||
while (!isIdling && weakGreaterThan(availableTicks, 0.0)) {
|
||||
while (!isIdling && weakGreaterThan(availableTicks, 0.0) && throttleTicks <= 0) {
|
||||
if (isBlockedByRedstone) {
|
||||
isIdling = true
|
||||
break
|
||||
@ -346,6 +346,7 @@ abstract class MatteryWorkerBlockEntity<JobType : MatteryWorkerBlockEntity.Job>(
|
||||
}
|
||||
|
||||
errorTicksAnim++
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user