diff options
author | Wyvest <wyvestbusiness@gmail.com> | 2023-11-22 08:18:19 +0900 |
---|---|---|
committer | Wyvest <wyvestbusiness@gmail.com> | 2023-11-22 08:18:19 +0900 |
commit | 8b373f577d9c6dde26357ef3fc86691f1efef9b4 (patch) | |
tree | a5328e995d8f4df21a9fe94ac8e384be08833c70 /src/main/java/cc/woverflow/chatting/mixin/ClientCommandHandlerMixin.java | |
parent | 64230799777473246b5f98efbc596206c5bbf42d (diff) | |
download | Chatting-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/ClientCommandHandlerMixin.java')
-rw-r--r-- | src/main/java/cc/woverflow/chatting/mixin/ClientCommandHandlerMixin.java | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/main/java/cc/woverflow/chatting/mixin/ClientCommandHandlerMixin.java b/src/main/java/cc/woverflow/chatting/mixin/ClientCommandHandlerMixin.java deleted file mode 100644 index f771c87..0000000 --- a/src/main/java/cc/woverflow/chatting/mixin/ClientCommandHandlerMixin.java +++ /dev/null @@ -1,33 +0,0 @@ -package cc.woverflow.chatting.mixin; - -import cc.woverflow.chatting.chat.ChatShortcuts; -import cc.woverflow.chatting.config.ChattingConfig; -import kotlin.Pair; -import net.minecraft.client.Minecraft; -import net.minecraft.command.CommandHandler; -import net.minecraft.command.ICommandSender; -import net.minecraft.util.BlockPos; -import net.minecraftforge.client.ClientCommandHandler; -import net.minecraftforge.fml.client.FMLClientHandler; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -import java.util.List; - -@Mixin(value = ClientCommandHandler.class, remap = false) -public class ClientCommandHandlerMixin extends CommandHandler { - @Redirect(method = "autoComplete", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/ClientCommandHandler;getTabCompletionOptions(Lnet/minecraft/command/ICommandSender;Ljava/lang/String;Lnet/minecraft/util/BlockPos;)Ljava/util/List;")) - private List<String> addChatShortcuts(ClientCommandHandler instance, ICommandSender iCommandSender, String leftOfCursor, BlockPos blockPos) { - Minecraft mc = FMLClientHandler.instance().getClient(); - List<String> autocompleteList = instance.getTabCompletionOptions(mc.thePlayer, leftOfCursor, mc.thePlayer.getPosition()); - if (ChattingConfig.INSTANCE.getChatShortcuts()) { - for (Pair<String, String> pair : ChatShortcuts.INSTANCE.getShortcuts()) { - if (pair.getFirst().startsWith(leftOfCursor)) { - autocompleteList.add(pair.getFirst()); - } - } - } - return autocompleteList; - } -} |