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) --- build.gradle | 9 ++++----- src/main/kotlin/cc/woverflow/chatting/Chatting.kt | 8 +++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 5f09f93..30dc6ac 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id "dev.architectury.architectury-pack200" version "0.1.3" id 'org.jetbrains.kotlin.jvm' version '1.6.10' - id "gg.essential.loom" version "0.10.0.3" + id "cc.polyfrost.loom" version "0.10.0.5" id "net.kyori.blossom" version "1.3.0" id "java" } @@ -27,7 +27,7 @@ compileJava.options.encoding = 'UTF-8' loom { launchConfigs { client { - arg("--tweakClass", "cc.polyfrost.oneconfigwrapper.OneConfigWrapper") + arg("--tweakClass", "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker") property("mixin.debug.export", "true") } } @@ -51,7 +51,6 @@ configurations { repositories { maven { url 'https://repo.polyfrost.cc/releases'} - maven { url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" } } dependencies { @@ -60,7 +59,7 @@ dependencies { forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9") compileOnly ('org.spongepowered:mixin:0.7.11-SNAPSHOT') compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.0-alpha+') - include('cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-alpha+') + include('cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+') modRuntimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.1.0") } @@ -108,6 +107,6 @@ jar { 'ForceLoadAsMod': true, 'MixinConfigs': "mixins.${mod_id}.json", "TweakOrder": "0", - "TweakClass": "cc.polyfrost.oneconfigwrapper.OneConfigWrapper", + "TweakClass": "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker" ) } \ No newline at end of file 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