The drawing order of tooltips is incorrect
BloCamLimb opened this issue · comments
Describe the bug
Tooltips have transparency and its Z value is 400, if the tooltip is drawn first, then all the elements that are drawn later will be discarded by depth test. So you cannot draw tooltips immediately before all elements with Z<400 are drawn.
Screen#setTooltipForNextRenderPass
is the right way to go. Please refer to this issue for a detailed explanation BloCamLimb/ModernUI#216
How can we reproduce this bug or crash?
The issue is just there, Platform.INSTANCE.renderTooltip(graphics, buildTooltip(), mouseX, mouseY);
should not be called at that time.
What Minecraft version is this happening on?
Minecraft 1.20.4
What NeoForge or Fabric version is this happening on?
The latest version at this moment
What Refined Storage version is this happening on?
The latest version at this moment
Relevant log output
No response
Thanks for reporting back, this will be fixed for mc 1.20.4.