aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/org/polyfrost/chatting/Chatting.kt
diff options
context:
space:
mode:
authorWyvest <wyvestbusiness@gmail.com>2023-11-23 19:07:22 +0900
committerWyvest <wyvestbusiness@gmail.com>2023-11-23 19:07:22 +0900
commit50dec3baa84ea72f9a711b936aabacf53aa04e05 (patch)
tree1f2840895ebf6934e2c1e9d78cfa3d963910b061 /src/main/kotlin/org/polyfrost/chatting/Chatting.kt
parent97a700fe1af0360b6deed3c6b0b0a3839d5a690d (diff)
downloadChatting-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.kt2
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()))