-
-
Notifications
You must be signed in to change notification settings - Fork 299
Fix: Rei search bar focus check #5225
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
base: beta
Are you sure you want to change the base?
Conversation
| searchBar?.isFocused == true | ||
| } catch (e: NoSuchMethodError) { | ||
| try { | ||
| searchBar?.javaClass?.getMethod("method_25370")?.invoke(searchBar) as Boolean? == true |
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.
could this be an accesswidener or accessor?
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.
how would i know
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.
i dont believe you can aw other mods
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.
the actual method call is from net.minecraft.client.gui.components.events.GuiEventListener but idk if that matters
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.
method_25370 looks an awful lot like an intermediary mapping, which can be awed
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.
This is a workaround for a problem that needs to be properly understood first.
Why does isFocused throw NoSuchMethodError in the first place?
That is the actual root cause, which has not been investigated. This underlying issue should be investigated before adding a workaround.
A cleaner approach might be to cast to GuiEventListener instead of using reflection:
(searchBar as? GuiEventListener)?.isFocused == trueHave you tested something like this already?
|
that does seem to just work not sure how i forgot to try that first lol |
|
TextField.isFocused() is from REI, not Minecraft code. So as long as they don't obfuscate the code like cheats do, this is not related to many mappings, neither moaning nor yarn. The function is just in their raw plain name during runtime. |
3 similar comments
|
TextField.isFocused() is from REI, not Minecraft code. So as long as they don't obfuscate the code like cheats do, this is not related to many mappings, neither moaning nor yarn. The function is just in their raw plain name during runtime. |
|
TextField.isFocused() is from REI, not Minecraft code. So as long as they don't obfuscate the code like cheats do, this is not related to many mappings, neither moaning nor yarn. The function is just in their raw plain name during runtime. |
|
TextField.isFocused() is from REI, not Minecraft code. So as long as they don't obfuscate the code like cheats do, this is not related to many mappings, neither moaning nor yarn. The function is just in their raw plain name during runtime. |
TextField.isFocused() is from REI, not Minecraft code. So as long as they don't obfuscate the code like cheats do, this is not related to many mappings, neither moaning nor yarn. The function is just in their raw plain name during runtime. |
1 similar comment
TextField.isFocused() is from REI, not Minecraft code. So as long as they don't obfuscate the code like cheats do, this is not related to many mappings, neither moaning nor yarn. The function is just in their raw plain name during runtime. |
|
Who said using GitHub for Android is a good idea? I'm not gonna delete the other messages now our of spite. Sorry. |
|
yea what he said |

What
Cast to the base mc class the required method is in so there arnt mapping issues
screen null check is because it seems to still return true if you esc out of the screen while the search bar is focused
Changelog Fixes