[Request] Tell JEI about the extra areas AE GUIs draw
mezz opened this issue · 9 comments
Describe the feature
Currently, some AE guis overlap a bit with JEI because of the extras they have on the left and right sides.
There is no way to detect these automatically in JEI, but AE can use its JEI Plugin to do it.
In appeng.integration.modules.jei.JEIPlugin#register
call
mezz.jei.api.IModRegistry#addAdvancedGuiHandlers
and implement a IAdvancedGuiHandler
for your gui.
mezz.jei.api.gui.IAdvancedGuiHandler#getGuiExtraAreas
is the method that will tell JEI about extra slots on the sides of your gui so that JEI can move out of the way.
To test fully, use the latest version of JEI and add some bookmarks to the left panel by hovering over items and pressing 'a'.
Reasons why it should be considered
It creates a more pleasing experience for players.
Additional Context
Here is the original issue reported to JEI: mezz/JustEnoughItems#1484
Will be considered once there is time to refactor the whole GUI part to make these things easier.
Sounds good. I was going to PR it myself but things got complicated, so I understand why you’d want to refactor first.
@mezz Is this still relevant in 1.15? I think JEI now automatically inspects the current screen's size if I am not mistaken, or at least I don't see any obvious overlaps in 1.15 anymore.
JEI works the same way, maybe AE is supplying different values in 1.15?
If there are no overlaps then this is solved.
@mezz We're in the process of implementing this, but on tall terminals, we see the following effect:
Is the only way to fix this to move our toolbars down?
This is with JEI 7.6.1.71