From e5b86964b2ab0dc692348f7b837ece0a750ddf58 Mon Sep 17 00:00:00 2001 From: SpvceR3ii Date: Tue, 20 Aug 2024 19:09:34 +0100 Subject: [PATCH] Updated TimeClicker.java with annotations very kind words :> --- src/main/java/com/spacereii/timeclicker/TimeClicker.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/spacereii/timeclicker/TimeClicker.java b/src/main/java/com/spacereii/timeclicker/TimeClicker.java index 878c25c..95d0e1d 100644 --- a/src/main/java/com/spacereii/timeclicker/TimeClicker.java +++ b/src/main/java/com/spacereii/timeclicker/TimeClicker.java @@ -6,6 +6,7 @@ import net.minecraft.client.gui.DrawContext; import net.minecraft.text.Text; +// fucking hell public class TimeClicker implements ClientModInitializer { private long startTime; @@ -17,6 +18,7 @@ public void onInitializeClient() { HudRenderCallback.EVENT.register(this::onHudRender); } + // render the client and calculate the shi private void onHudRender(DrawContext drawContext, float tickDelta) { MinecraftClient client = MinecraftClient.getInstance(); long currentTime = System.currentTimeMillis(); @@ -25,7 +27,7 @@ private void onHudRender(DrawContext drawContext, float tickDelta) { long minutes = (timePlayedMillis / (1000 * 60)) % 60; long hours = (timePlayedMillis / (1000 * 60 * 60)) % 24; - String timePlayed = String.format("Time Played: %02d:%02d:%02d", hours, minutes, seconds); - drawContext.drawTextWithShadow(client.textRenderer, Text.of(timePlayed), 10, 10, 0xFFFFFF); + String timePlayed = String.format("Time Played: %02d:%02d:%02d", hours, minutes, seconds); // the actual thing + drawContext.drawTextWithShadow(client.textRenderer, Text.of(timePlayed), 10, 10, 0xFFFFFF); // config (?) } }