Move sleep weather cycle to off-main thread

This commit is contained in:
Sotr
2019-03-29 01:10:21 +08:00
parent 71899f9fa3
commit a32ca321d5
2 changed files with 9 additions and 0 deletions

View File

@@ -86,6 +86,10 @@ public class AkarinAsyncScheduler extends Thread {
world.worldData.setDayTime(i - i % 24000L);
}
if (world.getGameRules().getBoolean("doWeatherCycle")) {
world.clearWeather();
}
}
}

View File

@@ -389,12 +389,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
entityhuman.a(false, false, true);
}
// Akarin start
/*
if (this.getGameRules().getBoolean("doWeatherCycle")) {
this.b();
}
*/
// Akarin end
}
public void clearWeather() { this.b(); } // Akarin
private void b() {
// CraftBukkit start
this.worldData.setStorm(false);