From 57246080059aef7f7ff678c1edfc191ac8d52d82 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 4 May 2024 13:18:34 -0400 Subject: [PATCH] Class cleanup --- src/engine/gameManager/ForgeManager.java | 2 +- src/engine/mobileAI/MobAI.java | 4 ++-- .../mobileAI/Threads/{Respawner.java => ReSpawner.java} | 4 ++-- src/engine/server/world/WorldServer.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/engine/mobileAI/Threads/{Respawner.java => ReSpawner.java} (93%) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index a71a69af..0b86ff24 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -38,7 +38,7 @@ public enum ForgeManager implements Runnable { // // Replaces garbage code that looked as if written by a mental patient with face boils. // - // @TODO Reuse same set of virtual items for each workOrder cycle. + // @TODO Reuse same set of virtual items for all workOrder cycles. FORGE_MANAGER; diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index ef150c98..623dd22a 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -15,7 +15,7 @@ import engine.math.Vector3fImmutable; import engine.mbEnums; import engine.mbEnums.DispatchChannel; import engine.mobileAI.Threads.MobAIThread; -import engine.mobileAI.Threads.Respawner; +import engine.mobileAI.Threads.ReSpawner; import engine.mobileAI.utilities.MovementUtilities; import engine.net.DispatchMessage; import engine.net.client.msg.PerformActionMsg; @@ -740,7 +740,7 @@ public class MobAI { } } else if (System.currentTimeMillis() > aiAgent.deathTime + (aiAgent.spawnDelay * 1000L)) { aiAgent.respawnTime = aiAgent.deathTime + (aiAgent.spawnDelay * 1000L); - Respawner.respawnQueue.put(aiAgent); + ReSpawner.respawnQueue.put(aiAgent); } } catch (Exception e) { Logger.info(aiAgent.getObjectUUID() + " " + aiAgent.getName() + " Failed At: CheckForRespawn" + " " + e.getMessage()); diff --git a/src/engine/mobileAI/Threads/Respawner.java b/src/engine/mobileAI/Threads/ReSpawner.java similarity index 93% rename from src/engine/mobileAI/Threads/Respawner.java rename to src/engine/mobileAI/Threads/ReSpawner.java index 73ca78f8..b72d7ed5 100644 --- a/src/engine/mobileAI/Threads/Respawner.java +++ b/src/engine/mobileAI/Threads/ReSpawner.java @@ -15,7 +15,7 @@ import org.pmw.tinylog.Logger; import java.util.concurrent.BlockingQueue; import java.util.concurrent.DelayQueue; -public enum Respawner implements Runnable { +public enum ReSpawner implements Runnable { // MB Dev Notes: // @@ -25,7 +25,7 @@ public enum Respawner implements Runnable { RESPAWNER; - public static BlockingQueue respawnQueue = new DelayQueue(); + public static final BlockingQueue respawnQueue = new DelayQueue<>(); @Override public void run() { diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 2187545c..08efd842 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -24,7 +24,7 @@ import engine.mbEnums.DispatchChannel; import engine.mbEnums.MinionType; import engine.mbEnums.SupportMsgType; import engine.mobileAI.Threads.MobAIThread; -import engine.mobileAI.Threads.Respawner; +import engine.mobileAI.Threads.ReSpawner; import engine.net.DispatchMessage; import engine.net.Network; import engine.net.Protocol; @@ -455,7 +455,7 @@ public class WorldServer { //intiate mob respawn thread Logger.info("Starting Mob Respawn Thread"); - Respawner.start(); + ReSpawner.start(); Logger.info("Loading effect cost maps"); DbManager.EffectsResourceCostsQueries.LOAD_ALL_COSTMAPS();