diff options
author | Wyvest <wyvestbusiness@gmail.com> | 2023-11-23 19:07:22 +0900 |
---|---|---|
committer | Wyvest <wyvestbusiness@gmail.com> | 2023-11-23 19:07:22 +0900 |
commit | 50dec3baa84ea72f9a711b936aabacf53aa04e05 (patch) | |
tree | 1f2840895ebf6934e2c1e9d78cfa3d963910b061 /src/main/kotlin/org/polyfrost/chatting/Chatting.kt | |
parent | 97a700fe1af0360b6deed3c6b0b0a3839d5a690d (diff) | |
download | Chatting-50dec3baa84ea72f9a711b936aabacf53aa04e05.tar.gz Chatting-50dec3baa84ea72f9a711b936aabacf53aa04e05.tar.bz2 Chatting-50dec3baa84ea72f9a711b936aabacf53aa04e05.zip |
Various chat head bug fixes
- Fix chat heads making chat lines go over chat background
- Fix chat heads making tooltip hovers not work properly
Diffstat (limited to 'src/main/kotlin/org/polyfrost/chatting/Chatting.kt')
-rw-r--r-- | src/main/kotlin/org/polyfrost/chatting/Chatting.kt | 2 |
1 files changed, 1 insertions, 1 deletions
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())) |