neoforged / NeoForge

Neo Modding API for Minecraft, based on Forge
https://projects.neoforged.net/neoforged/neoforge
Other
1.14k stars 165 forks source link

Rendering a overlay above the hotbar now also renders it above the items in the hotbar #1478

Closed IThundxr closed 2 weeks ago

IThundxr commented 3 weeks ago

Minecraft Version: 1.21.1

NeoForge Version: 21.1.4

Description of issue: In 1.20.1 rendering a overlay above the hotbar used to render it above the hotbar but behind the items in the hotbar, however this is no longer the case as it will render it above the items aswell, another layer should be added allowing you to render the overlay behind the items.

KnightMiner commented 3 weeks ago

Can you not just render your stuff at a different Z offset to achieve this?

IThundxr commented 3 weeks ago

Can you not just render your stuff at a different Z offset to achieve this?

No since that ends up messing the rendered texture up, i need to render the texture before the item is rendered

sciwhiz12 commented 3 weeks ago

Could you please provide example code and screenshots demonstrating the issue?

IThundxr commented 2 weeks ago

Apparently the texture always just looks a bit broken, not sure how i didn't notice previously, but wrapping my draw call like the following works fine.

        PoseStack ms = graphics.pose();
        ms.pushPose();
        ms.translate(0, 0, -300);
        // draw call here
        ms.popPose();