1
0
forked from Clones/Controlify

🐛 Fix chat rendering incorrectly when hidden (close #119)

This commit is contained in:
isXander
2023-07-27 20:15:04 +01:00
parent 5bf08bacb9
commit 1df7925109

View File

@ -18,7 +18,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class ChatComponentMixin {
@Shadow @Final private Minecraft minecraft;
@Inject(method = "render", at = @At("HEAD"))
// the below TAIL injects inside the multiple conditional statements, so can't use HEAD, but the first target inside the inner-most if
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/components/ChatComponent;isChatFocused()Z", ordinal = 0))
private void translateRender(GuiGraphics graphics, int tickDelta, int i, int j, CallbackInfo ci) {
if (!(minecraft.screen instanceof ChatScreen))
return;