mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 19:25:20 -04:00
crashing on start to show a warning when doDaylightCycle is false (since sleeps will never elapse in that mode computers won't start up)
This commit is contained in:
parent
48217254b8
commit
dbc3af26d2
@ -108,7 +108,12 @@ class Computer(val owner: tileentity.Computer) extends ManagedComponent with Con
|
||||
|
||||
def start() = state.synchronized(state.top match {
|
||||
case Computer.State.Stopped =>
|
||||
if (owner.installedMemory > 0) {
|
||||
val rules = owner.world.getWorldInfo.getGameRulesInstance
|
||||
if (rules.hasRule("doDaylightCycle") && !rules.getGameRuleBooleanValue("doDaylightCycle")) {
|
||||
crash("computers don't work while time is frozen (gamerule doDaylightCycle is false)")
|
||||
false
|
||||
}
|
||||
else if (owner.installedMemory > 0) {
|
||||
if (Settings.get.ignorePower || node.globalBuffer > cost) {
|
||||
init() && {
|
||||
switchTo(Computer.State.Starting)
|
||||
|
Loading…
x
Reference in New Issue
Block a user