Skip to content

Commit

Permalink
fine then earth
Browse files Browse the repository at this point in the history
  • Loading branch information
RealRTTV committed Jun 23, 2024
1 parent bb269be commit 2c75477
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package net.earthcomputer.clientcommands.mixin.commands.generic;

import net.earthcomputer.clientcommands.ClientCommands;
import net.earthcomputer.clientcommands.command.ReplyCommand;
import net.earthcomputer.clientcommands.command.VarCommand;
import net.minecraft.client.gui.screens.ChatScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyVariable;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ChatScreen.class)
public class ChatScreenMixin {
Expand All @@ -22,9 +19,4 @@ private String onHandleChatInput(String message) {
}
return command;
}

@Inject(method = "init", at = @At("TAIL"))
private void onInit(CallbackInfo ci) {
ReplyCommand.onChatOpened();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package net.earthcomputer.clientcommands.mixin.commands.reply;

import net.earthcomputer.clientcommands.command.ReplyCommand;
import net.minecraft.client.gui.screens.ChatScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ChatScreen.class)
public class ChatScreenMixin {
@Inject(method = "init", at = @At("TAIL"))
private void onInit(CallbackInfo ci) {
ReplyCommand.onChatOpened();
}
}
1 change: 1 addition & 0 deletions src/main/resources/mixins.clientcommands.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"commands.findblock.ClientLevelMixin",
"commands.generic.ClientPacketListenerMixin",
"commands.generic.CommandSuggestionsMixin",
"commands.reply.ChatScreenMixin",
"dataqueryhandler.ClientPacketListenerMixin",
"events.ClientPacketListenerMixin",
"lengthextender.ChatScreenMixin",
Expand Down

0 comments on commit 2c75477

Please sign in to comment.