From 3b694a936c7138acc5eaca3da2ec528c2e8c0894 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Wed, 18 Mar 2026 13:04:34 +0100 Subject: fix(timer): too long task converting into milliseconds instead of ticks --- src/main/java/world/anhgelus/molehunt/game/Game.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/world') diff --git a/src/main/java/world/anhgelus/molehunt/game/Game.java b/src/main/java/world/anhgelus/molehunt/game/Game.java index 98fe2b8..4f3234c 100644 --- a/src/main/java/world/anhgelus/molehunt/game/Game.java +++ b/src/main/java/world/anhgelus/molehunt/game/Game.java @@ -67,9 +67,9 @@ public class Game { timer.dds_runTask(new TickTask(() -> worldBorder.interpolateSize( Molehunt.CONFIG.getInitialWorldSize(), Molehunt.CONFIG.getFinalWorldSize(), - (long) (Molehunt.CONFIG.getGameDuration() - Molehunt.CONFIG.getBorderShrinkingStartingTimeOffset()) * 60 * 1000, + (Molehunt.CONFIG.getGameDuration() - Molehunt.CONFIG.getBorderShrinkingStartingTimeOffset()) * 60 * 20L, 0L - ), (long) Molehunt.CONFIG.getBorderShrinkingStartingTimeOffset() * 60 * 1000)); + ), Molehunt.CONFIG.getBorderShrinkingStartingTimeOffset() * 60 * 20L)); } final var title = new TitleS2CPacket(Text.translatable("molehunt.game.start.suspense")); @@ -114,8 +114,8 @@ public class Game { }); playerManager.sendToAll(timing); if (remaining == 0) end(); - }, 5 * 1000, 1000)); - }, 4 * 1000)); + }, 5 * 20, 20)); + }, 4 * 20)); } public void stop() { @@ -150,7 +150,7 @@ public class Game { pm.sendToAll(winner); pm.sendToAll(timing); moles.clear(); - }, 4 * 1000)); + }, 4 * 20)); } public Text getRemainingText() { -- cgit v1.2.3