Open EnricoMessall opened 1 month ago
Hey @sakura-ryoko
i've noticed you reverted the PR from your project:
"Revert PR https://github.com/maruohon/malilib/pull/164 from upstream, as this code causes rendering problems that you might not immediately notice."
can you explain which rendering problems happen there?
Inventory Overlay problems, Info Lines problems, etc. It causes the "Equipment" overlay to not display properly, and the Info Lines not display properly (Text is darkened out behind the BG), among other issues; perhaps.
I am referring to Snapshot; because under Snapshot, more of these elements needed to be moved to the DrawContext rendering away from the Global Stack rendering; such as with various textures; and it causes things rendered with the Global Stack to "Overlay" them.
If you want to test your code under Snapshot; go ahead and see the issues presented.
I see, for AdvancedChat its actually no problem, there you have all the Chat stuff above anything else as soon as you open the chat window, but for other modules that might be not wanted. Maybe its possible to inject into different layeredDrawer variables like the drawers that are private in the InGameHud at other positions then and its questionable if the registerGameOverlayRenderer is labeled correct with:
/**
It would need a second IRenderer.onRenderGameOverlayXXXXXX
Which malilib based menus are you having trouble with ?
You can see it in the corresponding issue #163 its about my 1.21.1 port of AdvancedChatHUD https://github.com/Arematics/AdvancedChatHUD
There I resolved it in the release by replacing the malilib injection of onRenderGameOverlayPost with the suggestion here.
Does 'AdvancedChatHud' use MaLiLib ?
Yes, all AdvancedChat Mods depend on it
Yes, all AdvancedChat Mods depend on it
Then I can just add an additional Interface for you to insert the rendering into the Drawer, while leaving the existing untouched. Does that work?
Sorry, i can also use it like that and keep the MaliLib Mixin overwritten as it is, my current AdvancedChatHUD release works as expected, i dont need a specific endpoint from Malilib :D Just wanted to mention earlier that maybe the JavaDoc for the onRenderGameOverlayPost might not be fully accurate when it says its after all Minecraft renders but then renders behind the InGameHUD elements as seen on the screenshot in #163
They perhaps added this to the code (Depth Test) and the Mixin wasn't changed. Under Snapshot, there is no enable/disable depth test at this location.