1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 09:24:48 +00:00
2024-09-04 08:28:29 -07:00

13 lines
384 B
JavaScript

let height = 0;
let maxJumpHeight = 3;
document.addEventListener('keydown', function(event) {
if (event.code == 'Space' && ModAPI.mcinstance.$currentScreen === null) {
if (height < maxJumpHeight) {
ModAPI.mcinstance.$thePlayer.$motionY = 1;
height += 1;
} else if (ModAPI.mcinstance.$thePlayer.$isCollidedVertically === 1){
height = 0;
}
}
});