Closed Alexdoru closed 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
Issue was that if you set the color alpha to be less than 1 before enabling blend, hudCaching sets the alpha to 1
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