UltimateTrainingModpack
UltimateTrainingModpack copied to clipboard
Fix "Menu Open Start Press" for 2/3 speed
In the current version of the Ultimate Training Modpack, trying hold the (+) button to open the modpack menu will fail when Speed is set to 2/3 in training mode.
This PR changes the logic for how the (+) input is processed, in order to fix this issue.
Unlike 1/2 and 1/4 speed, the 2/3 speed is not a cleanly divisible framerate. As a result, it is necessary to wait for 2 consecutive frames that the (+) button is known to have been released. This is necessary in order to prevent inputs from being processed incorrectly. Until 2 consecutive frames have passed, we're not sure if the user actually released the button, (as we often overwrite the (+) button press in the logic of the code itself)