yay
This commit is contained in:
parent
d1e42a9bf0
commit
63c2b682ad
@ -1,10 +1,17 @@
|
||||
package baritone.launch.mixins;
|
||||
|
||||
import baritone.bot.Baritone;
|
||||
import baritone.util.ChatCommand;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import java.util.List;
|
||||
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.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
/**
|
||||
* @author Brady
|
||||
@ -27,4 +34,16 @@ public class MixinGuiScreen {
|
||||
private static boolean isKeyDown(int keyCode) {
|
||||
return Baritone.INSTANCE.getInputOverrideHandler().isKeyDown(keyCode);
|
||||
}
|
||||
|
||||
@Inject(method="sendChatMessage",at=@At("HEAD"))
|
||||
public void sendChatMessage(String msg, CallbackInfo cir)
|
||||
{
|
||||
try {
|
||||
ChatCommand.message(msg);
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user