new dev build compatibility

This commit is contained in:
Cloudburst
2021-05-19 21:06:46 +02:00
parent fe70571790
commit 003068277f
11 changed files with 36 additions and 51 deletions

View File

@@ -4,7 +4,6 @@ import cloudburst.rejects.aax.AntiAntiXray;
import cloudburst.rejects.aax.Etc.Config;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import minegame159.meteorclient.systems.commands.Command;
import minegame159.meteorclient.utils.player.ChatUtils;
import net.minecraft.command.CommandSource;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
@@ -18,7 +17,7 @@ public class AntiAntiXrayCommand extends Command {
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(ctx -> {
AntiAntiXray.scanForFake(Config.rad, Config.delay);
ChatUtils.prefixInfo("AAX", "Refreshing blocks");
info("Refreshing blocks");
return SINGLE_SUCCESS;
});
}

View File

@@ -3,7 +3,6 @@ package cloudburst.rejects.commands;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
import minegame159.meteorclient.systems.commands.Command;
import minegame159.meteorclient.utils.player.ChatUtils;
import minegame159.meteorclient.utils.player.InvUtils;
import net.minecraft.command.CommandSource;
import net.minecraft.item.ItemStack;
@@ -49,7 +48,7 @@ public class BookDupeCommand extends Command {
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(context -> {
if (InvUtils.getHand(Items.WRITABLE_BOOK) != Hand.MAIN_HAND) ChatUtils.prefixError("BOOK DUPE", "No book found, you must be holding a writable book!");
if (InvUtils.getHand(Items.WRITABLE_BOOK) != Hand.MAIN_HAND) error("No book found, you must be holding a writable book!");
else mc.player.networkHandler.sendPacket(new BookUpdateC2SPacket(DUPE_BOOK, true, mc.player.inventory.selectedSlot));
return SINGLE_SUCCESS;

View File

@@ -4,15 +4,12 @@ import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import net.minecraft.command.CommandSource;
import net.minecraft.command.argument.ItemStackArgument;
import net.minecraft.command.argument.ItemStackArgumentType;
import net.minecraft.item.*;
import net.minecraft.nbt.*;
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
import cloudburst.rejects.arguments.EnumStringArgumentType;
import minegame159.meteorclient.systems.commands.Command;
import minegame159.meteorclient.utils.player.ChatUtils;
import minegame159.meteorclient.utils.player.SlotUtils;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
@@ -71,7 +68,7 @@ public class GiveCommand extends Command {
builder.then(literal("holo").then(argument("message", StringArgumentType.greedyString()).executes(ctx -> {
if (!mc.player.abilities.creativeMode) {
ChatUtils.error("Not In Creative Mode!");
error("Not In Creative Mode!");
return SINGLE_SUCCESS;
}
String message = ctx.getArgument("message", String.class);
@@ -96,7 +93,7 @@ public class GiveCommand extends Command {
builder.then(literal("firework").executes(ctx -> {
if (!mc.player.abilities.creativeMode) {
ChatUtils.error("Not In Creative Mode!");
error("Not In Creative Mode!");
return SINGLE_SUCCESS;
}
ItemStack firework = new ItemStack(Items.FIREWORK_ROCKET);
@@ -128,7 +125,7 @@ public class GiveCommand extends Command {
builder.then(literal("head").then(argument("owner",StringArgumentType.greedyString()).executes(ctx -> {
if (!mc.player.abilities.creativeMode) {
ChatUtils.error("Not In Creative Mode!");
error("Not In Creative Mode!");
return SINGLE_SUCCESS;
}
String playerName = ctx.getArgument("owner",String.class);
@@ -143,7 +140,7 @@ public class GiveCommand extends Command {
builder.then(literal("preset").then(argument("name", new EnumStringArgumentType(PRESETS))
.then(argument("container", new EnumStringArgumentType(CONTAINERS)).executes(context -> {
if (!mc.player.abilities.creativeMode) {
ChatUtils.error("Not In Creative Mode!");
error("Not In Creative Mode!");
return SINGLE_SUCCESS;
}
String name = context.getArgument("name", String.class);
@@ -160,6 +157,6 @@ public class GiveCommand extends Command {
mc.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(SlotUtils.indexToId(i), item));
return;
}
ChatUtils.error("No space in inventory.");
error("No space in inventory.");
}
}

View File

@@ -5,9 +5,7 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import minegame159.meteorclient.systems.commands.Command;
import minegame159.meteorclient.systems.commands.arguments.PlayerArgumentType;
import minegame159.meteorclient.utils.network.HttpUtils;
import minegame159.meteorclient.utils.player.ChatUtils;
import net.minecraft.command.CommandSource;
import net.minecraft.command.argument.GameProfileArgumentType;
import net.minecraft.entity.player.PlayerEntity;
import org.apache.commons.codec.binary.Base64;
import org.lwjgl.BufferUtils;