Skip to content
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

Add waitTick built-in to pressKey and pressMouse #4362

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

Earthcomputer
Copy link
Contributor

This addresses the footgun that the effects of key bindings aren't felt until a tick is waited.

This is a symptom of a wider issue with having the game suspended while gametest code is running, that sometimes the game needs to tick to see the effects of your code, depending on how that specific component of the game was coded. I don't think there is a way to completely solve this issue without reverting to running concurrently with the game which introduces thread safety issues which I believe are more dangerous.

I've added some documentation specifically warning users about the issue of delayed effects, and encouraging them to take debug screenshots to figure out what's going on, and that a simple waitTick could be the solution to their issue.

@modmuss50 modmuss50 added merge me please Pull requests that are ready to merge test small change labels Jan 8, 2025
@modmuss50 modmuss50 merged commit 5f21acd into FabricMC:1.21.4 Jan 14, 2025
4 checks passed
modmuss50 pushed a commit that referenced this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me please Pull requests that are ready to merge small change test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants