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

Don't ignore vanilla result for ScreenMouseEvents$After* and ScreenKeyboardEvents$After* events #3551

Open
Fuzss opened this issue Jan 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Fuzss
Copy link

Fuzss commented Jan 24, 2024

The vanilla Screen methods running before those events all have a boolean return type representing if the screen event was handled by the screen (or a widget on the screen). Fabric Api ignores that result, so there is no way of knowing if the screen method event was already handled.

It would be great to either not fire after events if the screen method event was already handled by vanilla (that's how the implementation for Post events on Forge/NeoForge works), or to at least include the result as an event parameter.

In some cases vanilla ignores the returned boolean when the screen method event call is the last statement in a method, but the result can easily be captured by using MixinExtra's @WrapOperation injector.

@modmuss50
Copy link
Member

Thanks for the issue. I see this boolean. I dont think we want to stop firing the event.

I think ideally we would want to pass this boolean through to the event handler. However to do so will require us to deprecate and replace the old event.

@modmuss50 modmuss50 added the enhancement New feature or request label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants