Skip to content

Use Correct HUD render event on 1.20.1#3

Open
decce6 wants to merge 1 commit into
Serilum:1.20.1from
decce6:1.20.1
Open

Use Correct HUD render event on 1.20.1#3
decce6 wants to merge 1 commit into
Serilum:1.20.1from
decce6:1.20.1

Conversation

@decce6
Copy link
Copy Markdown

@decce6 decce6 commented Nov 15, 2025

Currently the 1.20.1 version of the mod listens to RenderGuiOverlayEvent.Post to render the HUD. Unfortunately, as indicated by the "Overlay" part in the name, this event is posted every time an "overlay" is rendered (e.x. health bar, experience bar, hotbar, ...) Plus, mods are able to register their own overlays. This means in a large enough modpack, this mod's HUD may end up rendering 50+ times a frame! which bricks performance.

The simple fix is to use RenderGuiEvent.Post.

This fix should be straightforward enough but it's not tested. Please provide build instructions as gradlew build does not produce a usable mod jar. (according to Serilum/.issue-tracker#2508 (comment) , either build Collective locally or use the jar on the maven.)

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

Successfully merging this pull request may close these issues.

1 participant