aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_ChatSearching.java
diff options
context:
space:
mode:
authorWyvest <wyvestbusiness@gmail.com>2023-11-22 08:18:19 +0900
committerWyvest <wyvestbusiness@gmail.com>2023-11-22 08:18:19 +0900
commit8b373f577d9c6dde26357ef3fc86691f1efef9b4 (patch)
treea5328e995d8f4df21a9fe94ac8e384be08833c70 /src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_ChatSearching.java
parent64230799777473246b5f98efbc596206c5bbf42d (diff)
downloadChatting-8b373f577d9c6dde26357ef3fc86691f1efef9b4.tar.gz
Chatting-8b373f577d9c6dde26357ef3fc86691f1efef9b4.tar.bz2
Chatting-8b373f577d9c6dde26357ef3fc86691f1efef9b4.zip
update PGT and relocate to org.polyfrost
Diffstat (limited to 'src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_ChatSearching.java')
-rw-r--r--src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_ChatSearching.java31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_ChatSearching.java b/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_ChatSearching.java
deleted file mode 100644
index b40ba52..0000000
--- a/src/main/java/cc/woverflow/chatting/mixin/GuiNewChatMixin_ChatSearching.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cc.woverflow.chatting.mixin;
-
-import cc.woverflow.chatting.chat.ChatSearchingManager;
-import net.minecraft.client.gui.ChatLine;
-import net.minecraft.client.gui.GuiNewChat;
-import net.minecraft.util.IChatComponent;
-import org.objectweb.asm.Opcodes;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.Redirect;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-
-import java.util.List;
-
-@Mixin(GuiNewChat.class)
-public class GuiNewChatMixin_ChatSearching {
- @Shadow @Final private List<ChatLine> drawnChatLines;
-
- @Inject(method = "setChatLine", at = @At("HEAD"))
- private void handleSetChatLine(IChatComponent chatComponent, int chatLineId, int updateCounter, boolean displayOnly, CallbackInfo ci) {
- ChatSearchingManager.getCache().invalidateAll();
- }
-
- @Redirect(method = "drawChat", at = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/GuiNewChat;drawnChatLines:Ljava/util/List;", opcode = Opcodes.GETFIELD))
- private List<ChatLine> injected(GuiNewChat instance) {
- return ChatSearchingManager.filterMessages(ChatSearchingManager.INSTANCE.getLastSearch(), drawnChatLines);
- }
-}