From 50dec3baa84ea72f9a711b936aabacf53aa04e05 Mon Sep 17 00:00:00 2001 From: Wyvest Date: Thu, 23 Nov 2023 19:07:22 +0900 Subject: Various chat head bug fixes - Fix chat heads making chat lines go over chat background - Fix chat heads making tooltip hovers not work properly --- src/main/kotlin/org/polyfrost/chatting/Chatting.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/kotlin/org/polyfrost/chatting/Chatting.kt') diff --git a/src/main/kotlin/org/polyfrost/chatting/Chatting.kt b/src/main/kotlin/org/polyfrost/chatting/Chatting.kt index 0e8745c..cf439ce 100644 --- a/src/main/kotlin/org/polyfrost/chatting/Chatting.kt +++ b/src/main/kotlin/org/polyfrost/chatting/Chatting.kt @@ -245,7 +245,7 @@ object Chatting { } val fr: FontRenderer = ModCompatHooks.fontRenderer - val width = messages.maxOf { fr.getStringWidth(it.value) + (if (ChattingConfig.showChatHeads && ((it.key as ChatLineHook).hasDetected() || ChattingConfig.offsetNonPlayerMessages)) 10 else 0) } + 4 + val width = messages.maxOf { fr.getStringWidth(it.value) + (if (ChattingConfig.showChatHeads && ((it.key as ChatLineHook).isDetected || ChattingConfig.offsetNonPlayerMessages)) 10 else 0) } + 4 val fb: Framebuffer = createBindFramebuffer(width * 2, (messages.size * 9) * 2) val file = File(Minecraft.getMinecraft().mcDataDir, "screenshots/chat/" + fileFormatter.format(Date())) -- cgit