Sk1erLLC / Patcher

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

Fix GuiChat ASM surrounding too many instructions with if statement #187

Open Alexdoru opened 1 month ago

Alexdoru commented 1 month ago

The code injected in the GuiChat.drawScreen method is surrounding all the code from the start of the method up to the drawRect call with an if statement. https://github.com/Sk1erLLC/Patcher/blob/4ce6e196e5ad1339f8a0ab96eb5680c2f6464583/src/main/java/club/sk1er/patcher/asm/render/screen/GuiChatTransformer.java#L67

If another ASM mod injected code at HEAD, that code will be wraped too with the if statement.

I suggest deleting that ASM and instead use a mixin using the @WrapWithCondition targeting the drawRect call