aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/cc/woverflow
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2023-01-14 14:51:55 -0500
committerWyvest <45589059+Wyvest@users.noreply.github.com>2023-01-14 14:51:55 -0500
commite52b994b8a7c32badab7017dc0040d6bfb1cbedb (patch)
treeb7f1005a994524ee4f55b4eb0cf70e5038aef07a /src/main/kotlin/cc/woverflow
parente574e54a53b87ef4bbb33404b6fdb6b97c72dd81 (diff)
downloadChatting-e52b994b8a7c32badab7017dc0040d6bfb1cbedb.tar.gz
Chatting-e52b994b8a7c32badab7017dc0040d6bfb1cbedb.tar.bz2
Chatting-e52b994b8a7c32badab7017dc0040d6bfb1cbedb.zip
split GuiNewChatMixin into different mixins
Diffstat (limited to 'src/main/kotlin/cc/woverflow')
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/chat/ChatSearchingManager.kt9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/kotlin/cc/woverflow/chatting/chat/ChatSearchingManager.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSearchingManager.kt
index 25d479a..33a2642 100644
--- a/src/main/kotlin/cc/woverflow/chatting/chat/ChatSearchingManager.kt
+++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSearchingManager.kt
@@ -3,8 +3,6 @@ package cc.woverflow.chatting.chat
import cc.polyfrost.oneconfig.libs.caffeine.cache.Cache
import cc.polyfrost.oneconfig.libs.caffeine.cache.Caffeine
import cc.polyfrost.oneconfig.libs.universal.wrappers.message.UTextComponent
-import cc.woverflow.chatting.hook.GuiNewChatHook
-import net.minecraft.client.Minecraft
import net.minecraft.client.gui.ChatLine
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.ThreadPoolExecutor
@@ -27,6 +25,8 @@ object ChatSearchingManager {
@JvmStatic
val cache: Cache<String, List<ChatLine>> = Caffeine.newBuilder().executor(POOL).maximumSize(5000).build()
+ var lastSearch = ""
+
@JvmStatic
fun filterMessages(text: String, list: List<ChatLine>): List<ChatLine>? {
if (text.isBlank()) return list
@@ -39,9 +39,4 @@ object ChatSearchingManager {
cache.getIfPresent(text)
}
}
-
- @JvmStatic
- fun setPrevText(text: String) {
- (Minecraft.getMinecraft().ingameGUI.chatGUI as GuiNewChatHook).prevText = text
- }
} \ No newline at end of file