1.19.1 update (#145)
Co-authored-by: Cloudburst <18114966+C10udburst@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package anticope.rejects.commands;
|
||||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
||||
import meteordevelopment.meteorclient.utils.player.ChatUtils;
|
||||
import net.minecraft.client.util.GlfwUtil;
|
||||
import net.minecraft.command.CommandSource;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
|
||||
@@ -35,7 +36,7 @@ public class KickCommand extends Command {
|
||||
return SINGLE_SUCCESS;
|
||||
}));
|
||||
builder.then(literal("chat").executes(ctx -> {
|
||||
mc.player.sendChatMessage("§0§1§");
|
||||
ChatUtils.sendPlayerMsg("§0§1§");
|
||||
return SINGLE_SUCCESS;
|
||||
}));
|
||||
builder.then(literal("shutdown").executes(ctx -> {
|
||||
|
||||
@@ -187,7 +187,7 @@ public class InteractionScreen extends Screen {
|
||||
index[0]++;
|
||||
}
|
||||
}
|
||||
e.getItemsHand().forEach(itemStack -> {
|
||||
e.getHandItems().forEach(itemStack -> {
|
||||
if (itemStack != null) {
|
||||
stack[index[0]] = itemStack;
|
||||
index[0]++;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import anticope.rejects.modules.modifier.NoRenderModifier;
|
||||
import net.minecraft.client.gui.screen.CommandSuggestor;
|
||||
import net.minecraft.client.gui.screen.ChatInputSuggestor;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
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(CommandSuggestor.class)
|
||||
@Mixin(ChatInputSuggestor.class)
|
||||
public class CommandSuggestorMixin {
|
||||
@Inject(method = "render", at = @At(value = "HEAD"), cancellable = true)
|
||||
public void onRenderCommandSuggestion(MatrixStack matrices, int mouseX, int mouseY, CallbackInfo info) {
|
||||
|
||||
@@ -23,7 +23,6 @@ public class MineProcessMixin {
|
||||
|
||||
@Shadow(remap = false)
|
||||
private List<BlockPos> a; // knownOreLocations
|
||||
|
||||
@Inject(method = "a(Ljava/util/List;Lbaritone/pathing/movement/CalculationContext;)V", at = @At("HEAD"), cancellable = true, remap = false)
|
||||
private void onRescan(List<BlockPos> already, CalculationContext context, CallbackInfo ci) {
|
||||
OreSim oreSim = Modules.get().get(OreSim.class);
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.HashMap;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import meteordevelopment.meteorclient.gui.utils.StarscriptTextBoxRenderer;
|
||||
import meteordevelopment.meteorclient.utils.player.ChatUtils;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtString;
|
||||
import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket;
|
||||
@@ -70,13 +71,13 @@ public class ChatBot extends Module {
|
||||
for (String cmd : commands.keySet()) {
|
||||
if (msg.endsWith(prefix.get()+cmd)) {
|
||||
Script script = compile(commands.get(cmd));
|
||||
if (script == null) mc.player.sendChatMessage("An error occurred");
|
||||
if (script == null) ChatUtils.sendPlayerMsg("An error occurred");
|
||||
try {
|
||||
var section = MeteorStarscript.ss.run(script);
|
||||
mc.player.sendChatMessage(section.text);
|
||||
ChatUtils.sendPlayerMsg(section.text);
|
||||
} catch (StarscriptError e) {
|
||||
MeteorStarscript.printChatError(e);
|
||||
mc.player.sendChatMessage("An error occurred");
|
||||
ChatUtils.sendPlayerMsg("An error occurred");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user