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();