From 16c9317a36592de148b5aadd6b62a4804e480d57 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Sun, 15 Mar 2020 13:20:55 -0500 Subject: [PATCH] Fix flickering sky if time is too high (Closes #200) This was caused because the max int size is 2,147,483,647, which is what Minecraft: Bedrock Edition uses in the time packet. In Minecraft: Java Edition, a long is used which has a max length of 9,223,372,036,854,775,807, thus causing the sky to bug out. This commit uses the modulus operator with the max time value per-day of 24,000 to retrieve the remainder. --- .../translators/java/world/JavaUpdateTimeTranslator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaUpdateTimeTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaUpdateTimeTranslator.java index e2173e2c..e820e278 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaUpdateTimeTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaUpdateTimeTranslator.java @@ -34,9 +34,9 @@ public class JavaUpdateTimeTranslator extends PacketTranslator