stackotter / delta-client

An open source Minecraft Java Edition client built for speed.
https://deltaclient.app
GNU General Public License v3.0
322 stars 33 forks source link

Implement double tap space to fly and double tap forwards to sprint #126

Closed stackotter closed 1 year ago

stackotter commented 1 year ago

If you fix this issue it should help you get acquainted with Delta Client's input handling system.

I have grouped these two together because they are clearly very similar features.

The best way to implement this is probably to add a timeSinceForwards property and a timeSinceJump property to the InputState component. These properties can each be used to store an integer that counts up once per tick and resets when the respective key changes from not pressed to pressed. If the key is pressed a maximum of 6 ticks later, then trigger the respective double tap action (if the action is valid, i.e. if the player is allowed to fly or sprint).

stackotter commented 1 year ago

Feel free to join the Discord server and ask for help if you get stuck. Everyone's happy to help!

jxhug commented 1 year ago

done in pr #170

stackotter commented 1 year ago

Double tap forwards to sprint was implemented by jxhug, and now just double tap jump to fly remains.

stackotter commented 1 year ago

Implement double tap space to unfly (currently the only way to 'unfly' is to hit the ground)

stackotter commented 1 year ago

Done now