Skip to content

Add some QoL options to auto-walk #5440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 7, 2025

Conversation

chri-k
Copy link
Contributor

@chri-k chri-k commented May 30, 2025

Type of change

  • Bug fix
  • New feature

Description

Adds options to disable auto-walk when a movement key is pressed and on vertical movement, adds option to disallow movement into unloaded chunks (set by default)

Related issues

#5439
#5438

How Has This Been Tested?

works*. interaction of unloaded chunk prevention with anticheats not tested, fix already exists in case it's broken.

* GuiMove causes the emission of a KeyEvent with KeyAction.Press for held movement keys when the player inventory is opened (no other GUI produces the same result), which causes disable-on-input to trigger on that. (fixed by #5480)

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@Wide-Cat
Copy link
Collaborator

Wide-Cat commented Jun 2, 2025

Add a listener for MouseButtonEvent as well, since it's possible people have movement keys bound to mouse buttons.

@Wide-Cat
Copy link
Collaborator

Wide-Cat commented Jun 3, 2025

Can you elaborate on the issue to do with GuiMove emitting key events while you move with the player inventory open, but not with any other screens? Looking at the GuiMove code I don't really see any reason why if you are able to move with a screen open it would not emit key events.

@chri-k
Copy link
Contributor Author

chri-k commented Jun 3, 2025

you misread that. the issue is not that it doesn't emit key events, but that it emits fake ones.

GuiMove emits KeyEvent whenever it changes the state of a key. apparently this was added 3 years ago by minegame to fix some issue with FreeCam.

AutoWalk happens to trigger this when the inventory is opened, causing an unexpected KeyEvent to be emitted for the movement key of the direction it is walking in.

at the moment there is no good way to tell whether the key was actually pressed, since many modules alter the key states (and in this case the event is emitted immediately after GuiMove itself overrides the key state)

@chri-k
Copy link
Contributor Author

chri-k commented Jun 3, 2025

making KeyEvent keep track of whether it is synthesized or not is the easiest solution, and should be good enough (there are hypothetical situations where it isn't, but realistically it is)

@chri-k chri-k mentioned this pull request Jun 7, 2025
5 tasks
@Wide-Cat Wide-Cat merged commit c59a465 into MeteorDevelopment:master Jun 7, 2025
1 check passed
@chri-k chri-k deleted the pr-autowalk branch June 7, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throttle Auto Walk on chunk loading issues Option to disable Auto Walk if user press any walk key
2 participants