I was thinking about adding the edit box in the API, but I realized that what More Overlays wants to do with it is actually really hacky. I don't really want to encourage other mods to use the search bar directly, they may misunderstand why I am exposing it to the API and do something weird by accident.
This PR adds a function that uses reflection to find the EditBox without caring about the field's name. It'll just search through all the fields and pick the first EditBox field. I think that will be safer against renames or class name changes in the future, and it allows MoreOverlays to work without compiling against JEI's internals.
This is a follow-up to https://github.com/mezz/JustEnoughItems/issues/3064
I was thinking about adding the edit box in the API, but I realized that what More Overlays wants to do with it is actually really hacky. I don't really want to encourage other mods to use the search bar directly, they may misunderstand why I am exposing it to the API and do something weird by accident.
This PR adds a function that uses reflection to find the EditBox without caring about the field's name. It'll just search through all the fields and pick the first EditBox field. I think that will be safer against renames or class name changes in the future, and it allows MoreOverlays to work without compiling against JEI's internals.