diff --git a/src/main/java/meteordevelopment/meteorclient/utils/Utils.java b/src/main/java/meteordevelopment/meteorclient/utils/Utils.java index 26c04dd551..fd5b0fba56 100644 --- a/src/main/java/meteordevelopment/meteorclient/utils/Utils.java +++ b/src/main/java/meteordevelopment/meteorclient/utils/Utils.java @@ -126,9 +126,10 @@ public static Vec3 getPlayerSpeed() { public static String getWorldTime() { if (mc.level == null) return "00:00"; - int ticks = (int) (mc.level.getGameTime() % 24000); - ticks += 6000; - if (ticks > 24000) ticks -= 24000; + // Since 26.1 the day/night cycle runs on World Clocks; getGameTime() is the world + // age and is unaffected by /time, so it must not be used for time of day. + long ticks = Math.floorMod(mc.level.getDefaultClockTime(), 24000L); + ticks = (ticks + 6000L) % 24000L; return String.format("%02d:%02d", ticks / 1000, (int) (ticks % 1000 / 1000.0 * 60)); }