Sk1erLLC / Patcher

A Forge mod full of Vanilla bug fixes, Quality of Life improvements, and performance enhancements.
Other
228 stars 59 forks source link

HUD Caching not respecting alpha when drawing player heads #150

Closed Alexdoru closed 1 year ago

Alexdoru commented 1 year ago

In my mod, I am drawing heads of players in the chat next to their message. The head is supposed to fade away with the message but when HUD Caching is turned on, it doesn't work properly and the head is rendered as if the alpha was 1.0F

My code can be found here : https://github.com/Alexdoru/MegaWallsEnhancements/blob/3d7ae61c35374114922cf3957d6b11f101048541/src/main/java/fr/alexdoru/megawallsenhancementsmod/asm/hooks/GuiNewChatHook_ChatHeads.java#L19

https://github.com/Alexdoru/MegaWallsEnhancements/blob/3d7ae61c35374114922cf3957d6b11f101048541/src/main/java/fr/alexdoru/megawallsenhancementsmod/asm/transformers/GuiNewChatTransformer_ChatHeads.java

Video of the bug : https://youtu.be/p-WMlvxE4v8

Alexdoru commented 1 year ago

Issue was that if you set the color alpha to be less than 1 before enabling blend, hudCaching sets the alpha to 1