Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.21] Issue rendering via HudRenderCallback #3908

Open
lordrius opened this issue Jul 3, 2024 · 0 comments
Open

[1.21] Issue rendering via HudRenderCallback #3908

lordrius opened this issue Jul 3, 2024 · 0 comments

Comments

@lordrius
Copy link

lordrius commented Jul 3, 2024

Hi, I'm using HudRenderCallback event to render custom guis and things but I have noticed that when chat lines, messages overlay and action bar messages fade out it overlaps my custom gui. I have read the event notes and says:

Called after rendering the whole hud, which is displayed in game, in a world.

If the method is called after the hud renders, it should not be rendered on top of everything else? Am I doing anything wrong?

On the other hand, I have noticed that inside InGameHud.class there is a new thing called LayeredDrawer and all hud methods like hotbar, stats bars are added creating, I think, a ordered way to render things without overlap anything, but I'm not sure how it works...

The possible solution I have found is to inject my code into one of these methods, in particular inside of 'renderMiscOverlays' and now it renders fine..

Rendering via HudRenderCallback:
2024-07-03_15 41 07

Rendering via mixin InGameHud => renderMiscOverlays at head:
2024-07-03_15 59 41

Thank you very much in advance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant