Browse Source

Java 8 TimeUnit

combat-2
MagicBot 7 months ago
parent
commit
cabbf8bf44
  1. 3
      src/engine/gameManager/ForgeManager.java

3
src/engine/gameManager/ForgeManager.java

@ -18,6 +18,7 @@ import org.pmw.tinylog.Logger;
import java.util.HashMap; import java.util.HashMap;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.DelayQueue; import java.util.concurrent.DelayQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
public enum ForgeManager implements Runnable { public enum ForgeManager implements Runnable {
@ -149,7 +150,7 @@ public enum ForgeManager implements Runnable {
float rollingDuration; float rollingDuration;
rollingDuration = workOrder.vendor.getBuilding().getRank() * -5L + 40; rollingDuration = workOrder.vendor.getBuilding().getRank() * -5L + 40;
rollingDuration *= 60000; rollingDuration = TimeUnit.MINUTES.toMillis((long) rollingDuration);
rollingDuration *= Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue()); rollingDuration *= Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue());
ItemTemplate template = ItemTemplate.templates.get(workOrder.templateID); ItemTemplate template = ItemTemplate.templates.get(workOrder.templateID);

Loading…
Cancel
Save