|
|
@ -209,6 +209,7 @@ public class WorldServer { |
|
|
|
LocalDateTime nextHourlyJobTime = LocalDateTime.now().withMinute(0).withSecond(0).plusHours(0); |
|
|
|
LocalDateTime nextHourlyJobTime = LocalDateTime.now().withMinute(0).withSecond(0).plusHours(0); |
|
|
|
LocalDateTime nextWareHousePushTime = LocalDateTime.now(); |
|
|
|
LocalDateTime nextWareHousePushTime = LocalDateTime.now(); |
|
|
|
LocalDateTime nextDiscSpawn = LocalDateTime.now().withMinute(0).withSecond(0).plusHours(1); |
|
|
|
LocalDateTime nextDiscSpawn = LocalDateTime.now().withMinute(0).withSecond(0).plusHours(1); |
|
|
|
|
|
|
|
LocalDateTime nextMinePulse = LocalDateTime.now().withMinute(0).withSecond(0); |
|
|
|
|
|
|
|
|
|
|
|
// Begin execution of main game loop
|
|
|
|
// Begin execution of main game loop
|
|
|
|
|
|
|
|
|
|
|
@ -265,6 +266,13 @@ public class WorldServer { |
|
|
|
} |
|
|
|
} |
|
|
|
nextDiscSpawn = nextDiscSpawn.plusHours(1); |
|
|
|
nextDiscSpawn = nextDiscSpawn.plusHours(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LocalDateTime.now().isAfter(nextMinePulse)) { |
|
|
|
|
|
|
|
Thread mineThread = new Thread(new MineThread()); |
|
|
|
|
|
|
|
mineThread.setName("mineThread"); |
|
|
|
|
|
|
|
mineThread.start(); |
|
|
|
|
|
|
|
nextMinePulse = nextMinePulse.plusMinutes(30); |
|
|
|
|
|
|
|
} |
|
|
|
ThreadUtils.sleep(50); |
|
|
|
ThreadUtils.sleep(50); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -544,10 +552,10 @@ public class WorldServer { |
|
|
|
Logger.info("Running garbage collection..."); |
|
|
|
Logger.info("Running garbage collection..."); |
|
|
|
System.gc(); |
|
|
|
System.gc(); |
|
|
|
|
|
|
|
|
|
|
|
Logger.info("Starting Mine Thread..."); |
|
|
|
//Logger.info("Starting Mine Thread...");
|
|
|
|
Thread mineThread = new Thread(new MineThread()); |
|
|
|
//Thread mineThread = new Thread(new MineThread());
|
|
|
|
mineThread.setName("mine thread"); |
|
|
|
//mineThread.setName("mine thread");
|
|
|
|
mineThread.start(); |
|
|
|
//mineThread.start();
|
|
|
|
|
|
|
|
|
|
|
|
//Logger.info("Starting Power Thread...");
|
|
|
|
//Logger.info("Starting Power Thread...");
|
|
|
|
//Thread powerThread = new Thread(new PowersThread());
|
|
|
|
//Thread powerThread = new Thread(new PowersThread());
|
|
|
|