From 9062bc698e48aa60418f72e7b64bf88b7d4d9bf8 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 16 Jul 2023 21:25:43 +0200 Subject: [PATCH] Hotfix LaufbauState Signed-off-by: yoyosource --- .../features/slaves/laufbau/states/LaufbauState.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java index 88041527..6ece3e22 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java @@ -36,13 +36,13 @@ public interface LaufbauState { default String eta(Player p, long start, int done, int total) { if (total == 0) return ""; long elapsed = System.currentTimeMillis() - start; - long eta = (long) (elapsed / (done / (double) total) - elapsed); + long eta = ((long) (elapsed / (done / (double) total) - elapsed)) * 1000000; if (eta > 86399999999999L) { return LocalTime.ofNanoOfDay(86399999999999L).format(DateTimeFormatter.ofPattern(BauSystem.MESSAGE.parse("TIME", p))); } if (eta < 0) { return LocalTime.ofNanoOfDay(0).format(DateTimeFormatter.ofPattern(BauSystem.MESSAGE.parse("TIME", p))); } - return LocalTime.ofNanoOfDay(eta * 1000000).format(DateTimeFormatter.ofPattern(BauSystem.MESSAGE.parse("TIME", p))); + return LocalTime.ofNanoOfDay(eta).format(DateTimeFormatter.ofPattern(BauSystem.MESSAGE.parse("TIME", p))); } }