the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)

feat(timer): improve high-FPS timing with high-resolution Windows clock

+21 -4
+5 -4
Minecraft.Client/Timer.cpp
··· 22 22 { 23 23 __int64 nowMs = System::currentTimeMillis(); 24 24 __int64 passedMs = nowMs - lastMs; 25 - __int64 msSysTime = System::nanoTime() / 1000000; 26 - double now = msSysTime / 1000.0; 25 + 26 + // 4J - Use high-resolution timer for 'now' in seconds 27 + double now = System::nanoTime() / 1000000000.0; 27 28 28 29 29 30 if (passedMs > 1000) ··· 39 40 accumMs += passedMs; 40 41 if (accumMs > 1000) 41 42 { 43 + __int64 msSysTime = (__int64)(now * 1000.0); 42 44 __int64 passedMsSysTime = msSysTime - lastMsSysTime; 43 45 44 46 double adjustTimeT = accumMs / (double) passedMsSysTime; ··· 49 51 } 50 52 if (accumMs < 0) 51 53 { 52 - lastMsSysTime = msSysTime; 54 + lastMsSysTime = (__int64)(now * 1000.0); 53 55 } 54 56 } 55 57 lastMs = nowMs; ··· 68 70 if (ticks > MAX_TICKS_PER_UPDATE) ticks = MAX_TICKS_PER_UPDATE; 69 71 70 72 a = passedTime; 71 - 72 73 } 73 74 74 75 void Timer::advanceTimeQuickly()
+15
Minecraft.World/system.cpp
··· 52 52 //The current value of the system timer, in nanoseconds. 53 53 __int64 System::nanoTime() 54 54 { 55 + #if defined _WINDOWS64 || defined _XBOX || defined _WIN32 56 + static LARGE_INTEGER s_frequency = { 0 }; 57 + if (s_frequency.QuadPart == 0) 58 + { 59 + QueryPerformanceFrequency(&s_frequency); 60 + } 61 + 62 + LARGE_INTEGER counter; 63 + QueryPerformanceCounter(&counter); 64 + 65 + // Using double to avoid 64-bit overflow during multiplication for long uptime 66 + // Precision is sufficient for ~100 days of uptime. 67 + return (__int64)((double)counter.QuadPart * 1000000000.0 / (double)s_frequency.QuadPart); 68 + #else 55 69 return GetTickCount() * 1000000LL; 70 + #endif 56 71 } 57 72 58 73 //Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond,
+1
README.md
··· 16 16 - Added support for keyboard and mouse input 17 17 - Added fullscreen mode support (toggle using F11) 18 18 - Disabled V-Sync for better performance 19 + - Added a high-resolution timer path on Windows for smoother high-FPS gameplay timing 19 20 - Device's screen resolution will be used as the game resolution instead of using a fixed resolution (1920x1080) 20 21 21 22 ## Controls (Keyboard & Mouse)