Jolt Cracking
Within Minecraft's HUD code there is a private tick count variable within the HUD's class that is incremented for every tick that processes. The counter is initialized to zero when the class is contructed (the game is launched) and ticks occur as long as the game isn't paused in a singleplayer world. Uptime refers to how much real-world time the value of the tick counter corresponds to assuming smooth gameplay at 20 TPS (ticks per second).
Whenever the player has zero (or less) saturation and the tick count is divisible by 3*foodLevel+1 a jolt occurs. The food level, commonly referred to as just "hunger" is how full the hunger bar is in half icons. A full hunger bar gives a maximum food level of 20. When a jolt occurs, the hunger icons randomly shift up, down or remain in place according to a random number generator which is seeded by the tick count.
The combination of the food level and jolt pattern is unique enough to identify tick counts for hours without clashes (on average). By following the same process that the game uses to create jolts, we can brute force thousands of possible tick counts to find which ones could've produced the observed pattern and thus determine the uptime. While jolt patterns aren't entirely unique and 2/3 matches can occur, once you add one more jolt within the same timeframe that agrees closely with it then you can quite safely declare what the uptime is as a fact.
The main application for Jolt Cracking is finding hidden cuts in videos which appear as sudden discontinuities in otherwise straight 1:1 lines of video uptime to game uptime.
Python Version
If you'd like to get started with your own jolt cracking or see what an actual implemention of the algorithm looks like then you can download this simple Python Jolt Cracker:
DownloadTroubleshooting
- Make sure the pattern and food level is entered correctly. It can help to pause the video and go frame by frame (. and , on YouTube) in order to switch between a frame with and without the jolt to look at the relative motion rather than trying to eyeball the absolute offset.
- Check the player's health, if it is two hearts or less then you'll need to enable the low health mode (LH) to account for the additional random rolls consumed by the hearts shaking.
- If the player has a GUI open such as their inventory then empty food slots tend to not visibly shift due to the background darkening triggering heavy video compression. If the food level is 17/18 then you may be able to get around this simply by brute forcing the position of the first icon which may be impossible to tell.
- If you need help, join Fanda's Server.