Skip to content

current daytime broken after 26.x update #1

Description

@zdhd122a
net.minecraft.world.level

    Level
        getDayTime -> getOverworldClockTime, not one-to-one
        clockManager - The clock manager.
        getDefaultClockTime - Gets the clock time for the current dimension.

https://docs.neoforged.net/primer/docs/26.1/

test with client.level.getDefaultClockTime() working right now

diff --git a/26.2/src/main/java/com/cleanf3/CleanF3Hud.java b/26.2/src/main/java/com/cleanf3/CleanF3Hud.java
index 4ec16ed..b747b8d 100644
--- a/26.2/src/main/java/com/cleanf3/CleanF3Hud.java
+++ b/26.2/src/main/java/com/cleanf3/CleanF3Hud.java
@@ -148,7 +148,7 @@ public class CleanF3Hud {
         }

         if (config.showDayTime) {
-            long time = client.level.getGameTime() % 24000;
+            long time = client.level.getDefaultClockTime() % 24000;
             int hours = (int) ((time / 1000 + 6) % 24);
             int minutes = (int) ((time % 1000) * 60 / 1000);
             entries.add(new String[]{"Time: ", String.format("%02d:%02d", hours, minutes)});
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions