From cabbf8bf44df7b20c2d5bb4c66616203ef598ff0 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 13 Apr 2024 10:06:44 -0400 Subject: [PATCH] Java 8 TimeUnit --- src/engine/gameManager/ForgeManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 32c39b04..99d1b082 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -18,6 +18,7 @@ import org.pmw.tinylog.Logger; import java.util.HashMap; import java.util.concurrent.BlockingQueue; import java.util.concurrent.DelayQueue; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; public enum ForgeManager implements Runnable { @@ -149,7 +150,7 @@ public enum ForgeManager implements Runnable { float rollingDuration; rollingDuration = workOrder.vendor.getBuilding().getRank() * -5L + 40; - rollingDuration *= 60000; + rollingDuration = TimeUnit.MINUTES.toMillis((long) rollingDuration); rollingDuration *= Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue()); ItemTemplate template = ItemTemplate.templates.get(workOrder.templateID);