GirafiStudios / MineMenu

MIT License
24 stars 16 forks source link

Only render the menu once per render pass #159

Closed Crendgrim closed 1 year ago

Crendgrim commented 1 year ago

RenderGuiOverlayEvent.Post fires once per HUD component (health, armor, hotbar, scoreboard, boss bar, player list, ...). This means that the menu was rendered more than 25 times when once would be sufficient.

Arbitrarily choose the player list component as an anchor.

This becomes an issue when this mod is combined in combination with my mod Auto HUD, as this mod moves some of these components in different directions. That leads to the menu being duplicated on screen, offset off each other.

Closes Crendgrim/AutoHUD#74

GirafiStudios commented 1 year ago

Thank you very much! The original code for this is quite old by now, I think it´s all the way back from 1.7.10.