renderSuper prevents EMI from rendering
Closed this issue · 3 comments
Re: emilyploszaj/emi#203
It appears SophisticatedCore reimplements most of the super call copied out of a decompiler output instead of invoking it.
https://github.com/P3pp3rF1y/SophisticatedCore/blob/1.20.x/src/main/java/net/p3pp3rf1y/sophisticatedcore/client/gui/StorageScreenBase.java#L381
This is problematic for mods like EMI that need to render at certain points in the screen rendering process to not cause visual issues. The completely decompiler output copy paste prevents injections from being run. SophisticatedCore screens have been the only screens where an issue like this has occurred.
Ideally, this is something that can be resolved by SophisticatedCore by properly calling super.
well there are a few things I need to do there and even if I did this with mixins it would likely mean a mixin at the beginning that just returns before the rest of the super logic can run. So yeah that's not happening. But I implement calling forge events so compat should be possible even here.
just looking into this a bit more, the main thing there is passing the correct number of inventory slots that need to be rendered and there's no way even with mixins I can just replace what variable for loop uses to determine how many times to iterate over a collection of slots to render. So yeah the only solution with mixins is implement exactly the same method, inject it at the beginning of super and return right after.
But as said both background and foreground events are called and nothing stops you from handling those.