-
-
Notifications
You must be signed in to change notification settings - Fork 58
Fix crash in neoforge <1.21.9 with AbstractWidgetMixin #689
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
Fix crash in neoforge <1.21.9 with AbstractWidgetMixin #689
Conversation
|
Tested and verified this works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested. I was not able to reproduce any crashes on NeoForge 1.21.1, even when opening the mod config, which was the case for 2.3.0.
| //? if >=1.21.9 { | ||
| target = "Lnet/minecraft/client/gui/components/AbstractWidget;onClick(Lnet/minecraft/client/input/MouseButtonEvent;Z)V" | ||
| //?} else { | ||
| //?} elif fabric { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit: Since this issue is NeoForge/Forge-specific, as they modify the vanilla method signature, would it be better to check for NeoForge and then use the else case for Fabric?
This approach scales better if Controlify adds another mod loader in the future, and it makes the code’s semantics clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah probably.
Neoforge has an extra int, while Fabric does not.
Fixes #669
Fixes #665