From 99fe13770d1460e07f465e0cb8e3967812fcef2f Mon Sep 17 00:00:00 2001 From: XThe <101992755+SirXThe@users.noreply.github.com> Date: Sat, 25 Feb 2023 01:03:36 +0100 Subject: fix: resolve messages get shuffled in whole chat screenshots (#19) --- src/main/kotlin/cc/woverflow/chatting/Chatting.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/kotlin/cc/woverflow/chatting/Chatting.kt b/src/main/kotlin/cc/woverflow/chatting/Chatting.kt index 2faa234..ae5f8a1 100644 --- a/src/main/kotlin/cc/woverflow/chatting/Chatting.kt +++ b/src/main/kotlin/cc/woverflow/chatting/Chatting.kt @@ -2,9 +2,9 @@ package cc.woverflow.chatting import cc.polyfrost.oneconfig.libs.universal.UDesktop import cc.polyfrost.oneconfig.libs.universal.UResolution +import cc.polyfrost.oneconfig.utils.Notifications import cc.polyfrost.oneconfig.utils.commands.CommandManager import cc.polyfrost.oneconfig.utils.dsl.browseLink -import cc.polyfrost.oneconfig.utils.Notifications import cc.polyfrost.oneconfig.utils.gui.GuiUtils import cc.woverflow.chatting.chat.ChatSearchingManager import cc.woverflow.chatting.chat.ChatShortcuts @@ -41,6 +41,7 @@ import java.io.File import java.text.SimpleDateFormat import java.util.* import kotlin.collections.HashMap +import kotlin.collections.LinkedHashMap @Mod( @@ -116,7 +117,8 @@ object Chatting { if (isBetterChat) { Notifications.INSTANCE.send( NAME, - "BetterChat can be removed as it is replaced by Chatting. Click here to open your mods folder to delete the BetterChat file.", Runnable { + "BetterChat can be removed as it is replaced by Chatting. Click here to open your mods folder to delete the BetterChat file.", + Runnable { UDesktop.open(File("./mods")) }) } @@ -214,7 +216,7 @@ object Chatting { fun screenshotChat(scrollPos: Int) { val hud = Minecraft.getMinecraft().ingameGUI val chat = hud.chatGUI - val chatLines = HashMap() + val chatLines = LinkedHashMap() ChatSearchingManager.filterMessages( ChatSearchingManager.lastSearch, (chat as GuiNewChatAccessor).drawnChatLines -- cgit