From 2ca66673b466bc6c80a2a76291e95181b6a3f6d5 Mon Sep 17 00:00:00 2001 From: MathiewMay Date: Sun, 8 Mar 2026 22:09:37 -0400 Subject: [PATCH 1/2] Fix System::currentTimeMillis() not returning correct numbers for linux and preventing the game tick, which then broke the input system. --- Minecraft.World/Build/System.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Minecraft.World/Build/System.cpp b/Minecraft.World/Build/System.cpp index 07fe99bf8..b7f41b1fb 100644 --- a/Minecraft.World/Build/System.cpp +++ b/Minecraft.World/Build/System.cpp @@ -101,10 +101,9 @@ __int64 System::currentTimeMillis() #elif defined(__linux__) struct timeval tv; gettimeofday(&tv, NULL); - long long unix_time = tv.tv_sec; - long long file_time = (unix_time + 11644473600LL) * 10000000LL + tv.tv_usec * 10; - - return file_time; + // Convert to milliseconds since unix epoch instead of windows file time + // time is expecting calculation to be between 10-30 ms. + return (int64_t)tv.tv_sec * 1000LL + tv.tv_sec / 1000; #else SYSTEMTIME UTCSysTime; From da2cbecde97a624db80625f6459a659e84d91343 Mon Sep 17 00:00:00 2001 From: Danielcodedev <136135734+Danielcodedev@users.noreply.github.com> Date: Sun, 8 Mar 2026 21:23:17 -0600 Subject: [PATCH 2/2] Fix input W - S Now W Is forward and S is Backward --- 4J.Input/4J_Input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/4J.Input/4J_Input.cpp b/4J.Input/4J_Input.cpp index 2864779a5..764396c92 100644 --- a/4J.Input/4J_Input.cpp +++ b/4J.Input/4J_Input.cpp @@ -468,8 +468,8 @@ float C_4JInput::GetJoypadStick_LX(int /*iPad*/, bool /*bCheckMenuDisplay*/) { float C_4JInput::GetJoypadStick_LY(int /*iPad*/, bool /*bCheckMenuDisplay*/) { if (!s_mouseLocked) return 0.0f; float v = 0.0f; - if (KDown(GLFW_KEY_W)) v -= 1.0f; // W = forward = negative Y on consoles - if (KDown(GLFW_KEY_S)) v += 1.0f; + if (KDown(GLFW_KEY_W)) v += 1.0f; // W = forward = negative Y on consoles + if (KDown(GLFW_KEY_S)) v -= 1.0f; return v; }