Bug:
When an LDLib window is open and EMI is present, ModularUIGuiContainer calls EmiScreenManager::render and EmiScreenManager::drawForeground with depthTest=true and depthMask=true. This messes with the item rendering in EMI tooltips.
The proper item rendering loos like this:

But when an LDLib window is open (here, a GT 7.5.2 crate), we see this:

Calling the Emi rendering code from LDLib is not necessary. On Forge, EMI calls its render code itself via the forge events, in EmiClientForge::renderScreenForeground and EmiClientForge::postRenderScreen.
Removing the EmiScreenManager calls from ModularUIGuiContainer::render prevents double rendering and also fixes the depth bug.
Note:
I don't have a 100% understanding of what's going on, so for some more context:
Calling RenderSystem.clear(GL11.GL_DEPTH_BUFFER_BIT, Minecraft.ON_OSX) at the head of EmiScreenManager::drawForeground also fixes the bug, but it doesn't prevent the redundant rendering.
This is a different issue from the previous EMI and GregTech bugs.
LDLib 1.0.40.b
EMI 1.1.22+1.20.1+forge
GT 7.5.2
Forge 47.4.13
Minecraft 1.20.1
Bug:
When an LDLib window is open and EMI is present, ModularUIGuiContainer calls EmiScreenManager::render and EmiScreenManager::drawForeground with depthTest=true and depthMask=true. This messes with the item rendering in EMI tooltips.
The proper item rendering loos like this:

But when an LDLib window is open (here, a GT 7.5.2 crate), we see this:

Calling the Emi rendering code from LDLib is not necessary. On Forge, EMI calls its render code itself via the forge events, in EmiClientForge::renderScreenForeground and EmiClientForge::postRenderScreen.
Removing the EmiScreenManager calls from ModularUIGuiContainer::render prevents double rendering and also fixes the depth bug.
Note:
I don't have a 100% understanding of what's going on, so for some more context:
Calling
RenderSystem.clear(GL11.GL_DEPTH_BUFFER_BIT, Minecraft.ON_OSX)at the head of EmiScreenManager::drawForeground also fixes the bug, but it doesn't prevent the redundant rendering.This is a different issue from the previous EMI and GregTech bugs.
LDLib 1.0.40.b
EMI 1.1.22+1.20.1+forge
GT 7.5.2
Forge 47.4.13
Minecraft 1.20.1