From 92402097d425c0b534c22f6cbed0c3d9fce2c795 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 7 Apr 2024 22:53:41 -0400 Subject: [PATCH] ForgeManager started at boot --- src/engine/gameManager/ForgeManager.java | 10 ++++++++++ src/engine/server/world/WorldServer.java | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index d298b4ea..fa3dc66f 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -64,11 +64,21 @@ public enum ForgeManager implements Runnable { } } + public static void start() { + + Thread messageDispatcher; + messageDispatcher = new Thread(FORGE_MANAGER); + + messageDispatcher.setName("Forge Manager"); + messageDispatcher.start(); + } + public static void submit(WorkOrder workOrder) { workOrder.workOrderID = wordOrderCounter.incrementAndGet(); workOrder.completionTime = System.currentTimeMillis() + 10000; // 0 signifies single item roll. > 0 signifies multiple item roll. + workOrder.total_to_produce = Math.max(1, workOrder.total_to_produce); workOrders.add(workOrder); diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 446e9122..9895e271 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -455,6 +455,9 @@ public class WorldServer { Logger.info("Starting Mob Respawn Thread"); Respawner.start(); + Logger.info("Starting ForgeManager thread"); + ForgeManager.start(); + // Run maintenance MaintenanceManager.dailyMaintenance();