naari3 / offers-hud

OffersHUD is a client-side mod which display a list of villager's trading offers as a HUD, without a right-click.
https://www.curseforge.com/minecraft/mc-mods/offershud
MIT License
9 stars 1 forks source link

consider to using `HudRenderCallback.EVENT` instead of `InGameHud#renderStatusEffectOverlay` #39

Closed Minenash closed 6 months ago

Minenash commented 6 months ago

I noticed that you mixin into InGameHud and inject into the renderStatusEffectOverlay method. Like your description mentions, this could cause problems if other mods mess with status effect rendering.

Fabric API does have an event for hud rendering HudRenderCallback.EVENT. Using this would be less prone to accidental breakage

naari3 commented 6 months ago

@Minenash Oh no, I did not know how to do that! I learned the current method from the implementation of some HUD-related mod, and from what I've heard, that seems to be the better method. Thanks for letting me know!