Re-added AimAssist (#246)
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
# Features
|
# Features
|
||||||
## Modules
|
## Modules
|
||||||
|
- AimAssist (Removed from Meteor in [ee391](https://github.com/MeteorDevelopment/meteor-client/commit/ee391e431f345f253447f425dbc0de8625f88e65))
|
||||||
- AntiBot (Removed from Meteor in [166fc](https://github.com/MeteorDevelopment/meteor-client/commit/166fccc73e53de6cfdbe41ea58dc593a2f5011f6))
|
- AntiBot (Removed from Meteor in [166fc](https://github.com/MeteorDevelopment/meteor-client/commit/166fccc73e53de6cfdbe41ea58dc593a2f5011f6))
|
||||||
- AntiCrash (Ported from [Anti-ClientCrasher](https://github.com/wagyourtail/Anti-ClientCrasher))
|
- AntiCrash (Ported from [Anti-ClientCrasher](https://github.com/wagyourtail/Anti-ClientCrasher))
|
||||||
- AntiSpawnpoint
|
- AntiSpawnpoint
|
||||||
@@ -93,8 +94,6 @@
|
|||||||
- KillAura
|
- KillAura
|
||||||
- `Fov and invisible filter`
|
- `Fov and invisible filter`
|
||||||
- `Random Teleport, Hit Chance, Random Delay` (Removed from Meteor in [8722e](https://github.com/MeteorDevelopment/meteor-client/commit/8722ef565afa02ca4b6d9710a20fc9fcfd97bf05))
|
- `Random Teleport, Hit Chance, Random Delay` (Removed from Meteor in [8722e](https://github.com/MeteorDevelopment/meteor-client/commit/8722ef565afa02ca4b6d9710a20fc9fcfd97bf05))
|
||||||
- AimAssist
|
|
||||||
- `Fov filter`
|
|
||||||
- Alts
|
- Alts
|
||||||
- `Yggdrasil Login`
|
- `Yggdrasil Login`
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,20 @@
|
|||||||
package anticope.rejects;
|
package anticope.rejects;
|
||||||
|
|
||||||
import anticope.rejects.commands.*;
|
import anticope.rejects.commands.*;
|
||||||
import anticope.rejects.gui.hud.*;
|
import anticope.rejects.gui.hud.RadarHud;
|
||||||
import anticope.rejects.gui.themes.rounded.MeteorRoundedGuiTheme;
|
import anticope.rejects.gui.themes.rounded.MeteorRoundedGuiTheme;
|
||||||
import anticope.rejects.modules.*;
|
import anticope.rejects.modules.*;
|
||||||
import meteordevelopment.meteorclient.addons.GithubRepo;
|
import meteordevelopment.meteorclient.addons.GithubRepo;
|
||||||
import meteordevelopment.meteorclient.addons.MeteorAddon;
|
import meteordevelopment.meteorclient.addons.MeteorAddon;
|
||||||
|
import meteordevelopment.meteorclient.commands.Commands;
|
||||||
import meteordevelopment.meteorclient.gui.GuiThemes;
|
import meteordevelopment.meteorclient.gui.GuiThemes;
|
||||||
import meteordevelopment.meteorclient.systems.Systems;
|
import meteordevelopment.meteorclient.systems.Systems;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Commands;
|
|
||||||
import meteordevelopment.meteorclient.systems.hud.Hud;
|
import meteordevelopment.meteorclient.systems.hud.Hud;
|
||||||
import meteordevelopment.meteorclient.systems.hud.HudGroup;
|
import meteordevelopment.meteorclient.systems.hud.HudGroup;
|
||||||
import meteordevelopment.meteorclient.systems.modules.Category;
|
import meteordevelopment.meteorclient.systems.modules.Category;
|
||||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -31,6 +29,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
|||||||
|
|
||||||
// Modules
|
// Modules
|
||||||
Modules modules = Modules.get();
|
Modules modules = Modules.get();
|
||||||
|
modules.add(new AimAssist());
|
||||||
modules.add(new AntiBot());
|
modules.add(new AntiBot());
|
||||||
modules.add(new AntiCrash());
|
modules.add(new AntiCrash());
|
||||||
modules.add(new AntiSpawnpoint());
|
modules.add(new AntiSpawnpoint());
|
||||||
@@ -81,23 +80,22 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
|||||||
modules.add(new TreeAura());
|
modules.add(new TreeAura());
|
||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
Commands commands = Commands.get();
|
Commands.add(new CenterCommand());
|
||||||
commands.add(new CenterCommand());
|
Commands.add(new ClearChatCommand());
|
||||||
commands.add(new ClearChatCommand());
|
Commands.add(new GhostCommand());
|
||||||
commands.add(new GhostCommand());
|
Commands.add(new GiveCommand());
|
||||||
commands.add(new GiveCommand());
|
Commands.add(new HeadsCommand());
|
||||||
commands.add(new HeadsCommand());
|
Commands.add(new KickCommand());
|
||||||
commands.add(new KickCommand());
|
Commands.add(new LocateCommand());
|
||||||
commands.add(new LocateCommand());
|
Commands.add(new PanicCommand());
|
||||||
commands.add(new PanicCommand());
|
Commands.add(new ReconnectCommand());
|
||||||
commands.add(new ReconnectCommand());
|
Commands.add(new ServerCommand());
|
||||||
commands.add(new ServerCommand());
|
Commands.add(new SaveSkinCommand());
|
||||||
commands.add(new SaveSkinCommand());
|
Commands.add(new SeedCommand());
|
||||||
commands.add(new SeedCommand());
|
Commands.add(new SetBlockCommand());
|
||||||
commands.add(new SetBlockCommand());
|
Commands.add(new SetVelocityCommand());
|
||||||
commands.add(new SetVelocityCommand());
|
Commands.add(new TeleportCommand());
|
||||||
commands.add(new TeleportCommand());
|
Commands.add(new TerrainExport());
|
||||||
commands.add(new TerrainExport());
|
|
||||||
|
|
||||||
// HUD
|
// HUD
|
||||||
Hud hud = Systems.get(Hud.class);
|
Hud hud = Systems.get(Hud.class);
|
||||||
|
|||||||
@@ -8,20 +8,18 @@ import com.mojang.brigadier.suggestion.Suggestions;
|
|||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.command.argument.*;
|
import net.minecraft.command.argument.CoordinateArgument;
|
||||||
|
import net.minecraft.command.argument.Vec3ArgumentType;
|
||||||
import net.minecraft.server.command.CommandManager;
|
import net.minecraft.server.command.CommandManager;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
public class ClientPosArgumentType implements ArgumentType<Vec3d> {
|
public class ClientPosArgumentType implements ArgumentType<Vec3d> {
|
||||||
private static final Collection<String> EXAMPLES = Arrays.asList("0 0 0", "~ ~ ~", "~0.5 ~1 ~-5");
|
|
||||||
private static final MinecraftClient mc = MinecraftClient.getInstance();
|
private static final MinecraftClient mc = MinecraftClient.getInstance();
|
||||||
|
|
||||||
public ClientPosArgumentType() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ClientPosArgumentType pos() {
|
public static ClientPosArgumentType pos() {
|
||||||
return new ClientPosArgumentType();
|
return new ClientPosArgumentType();
|
||||||
}
|
}
|
||||||
@@ -31,9 +29,9 @@ public class ClientPosArgumentType implements ArgumentType<Vec3d> {
|
|||||||
return Suggestions.empty();
|
return Suggestions.empty();
|
||||||
} else {
|
} else {
|
||||||
String string = builder.getRemaining();
|
String string = builder.getRemaining();
|
||||||
Object collection2 = ((CommandSource)context.getSource()).getBlockPositionSuggestions();
|
Collection<CommandSource.RelativePosition> collection2 = ((CommandSource)context.getSource()).getBlockPositionSuggestions();
|
||||||
|
|
||||||
return CommandSource.suggestPositions(string, (Collection)collection2, builder, CommandManager.getCommandValidator(this::parse));
|
return CommandSource.suggestPositions(string, collection2, builder, CommandManager.getCommandValidator(this::parse));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
package anticope.rejects.arguments;
|
package anticope.rejects.arguments;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
|
|
||||||
import com.mojang.brigadier.StringReader;
|
import com.mojang.brigadier.StringReader;
|
||||||
import com.mojang.brigadier.arguments.ArgumentType;
|
import com.mojang.brigadier.arguments.ArgumentType;
|
||||||
import com.mojang.brigadier.context.CommandContext;
|
import com.mojang.brigadier.context.CommandContext;
|
||||||
@@ -10,11 +7,13 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
|||||||
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
|
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
|
||||||
import com.mojang.brigadier.suggestion.Suggestions;
|
import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
|
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
public class EnumArgumentType<T extends Enum<?>> implements ArgumentType<T> {
|
public class EnumArgumentType<T extends Enum<?>> implements ArgumentType<T> {
|
||||||
private static final DynamicCommandExceptionType NO_SUCH_TYPE = new DynamicCommandExceptionType(o ->
|
private static final DynamicCommandExceptionType NO_SUCH_TYPE = new DynamicCommandExceptionType(o ->
|
||||||
Text.literal(o + " is not a valid argument."));
|
Text.literal(o + " is not a valid argument."));
|
||||||
@@ -32,7 +31,7 @@ public class EnumArgumentType<T extends Enum<?>> implements ArgumentType<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends Enum<?>> EnumArgumentType<T> enumArgument(T defaultValue) {
|
public static <T extends Enum<?>> EnumArgumentType<T> enumArgument(T defaultValue) {
|
||||||
return new EnumArgumentType<T>(defaultValue);
|
return new EnumArgumentType<>(defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends Enum<?>> T getEnum(CommandContext<?> context, String name, T defaultValue) {
|
public static <T extends Enum<?>> T getEnum(CommandContext<?> context, String name, T defaultValue) {
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
package anticope.rejects.arguments;
|
package anticope.rejects.arguments;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
|
|
||||||
import com.mojang.brigadier.StringReader;
|
import com.mojang.brigadier.StringReader;
|
||||||
import com.mojang.brigadier.arguments.ArgumentType;
|
import com.mojang.brigadier.arguments.ArgumentType;
|
||||||
import com.mojang.brigadier.context.CommandContext;
|
import com.mojang.brigadier.context.CommandContext;
|
||||||
@@ -10,10 +7,12 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
|||||||
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
|
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
|
||||||
import com.mojang.brigadier.suggestion.Suggestions;
|
import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
|
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
public class EnumStringArgumentType implements ArgumentType<String> {
|
public class EnumStringArgumentType implements ArgumentType<String> {
|
||||||
|
|
||||||
private Collection<String> EXAMPLES;
|
private Collection<String> EXAMPLES;
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class CenterCommand extends Command {
|
public class CenterCommand extends Command {
|
||||||
public CenterCommand() {
|
public CenterCommand() {
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class ClearChatCommand extends Command {
|
public class ClearChatCommand extends Command {
|
||||||
public ClearChatCommand() {
|
public ClearChatCommand() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
|
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
|
|
||||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||||
@@ -10,8 +10,7 @@ import net.minecraft.util.math.BlockPos;
|
|||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
|
||||||
|
|
||||||
public class GhostCommand extends Command {
|
public class GhostCommand extends Command {
|
||||||
public GhostCommand() {
|
public GhostCommand() {
|
||||||
|
|||||||
@@ -1,28 +1,33 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
import anticope.rejects.arguments.EnumStringArgumentType;
|
import anticope.rejects.arguments.EnumStringArgumentType;
|
||||||
|
import anticope.rejects.utils.GiveUtils;
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.item.*;
|
import net.minecraft.item.BlockItem;
|
||||||
import net.minecraft.nbt.*;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
import anticope.rejects.utils.GiveUtils;
|
import net.minecraft.nbt.NbtCompound;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import net.minecraft.nbt.NbtDouble;
|
||||||
|
import net.minecraft.nbt.NbtList;
|
||||||
|
import net.minecraft.nbt.NbtString;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.registry.Registries;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import java.util.Collection;
|
||||||
|
|
||||||
import java.util.*;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class GiveCommand extends Command {
|
public class GiveCommand extends Command {
|
||||||
|
|
||||||
|
private final Collection<String> PRESETS = GiveUtils.PRESETS.keySet();
|
||||||
|
|
||||||
public GiveCommand() {
|
public GiveCommand() {
|
||||||
super("give", "Gives items in creative", "item", "kit");
|
super("give", "Gives items in creative", "item", "kit");
|
||||||
}
|
}
|
||||||
private final Collection<String> PRESETS = GiveUtils.PRESETS.keySet();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package anticope.rejects.commands;
|
|||||||
|
|
||||||
import anticope.rejects.gui.screens.HeadScreen;
|
import anticope.rejects.gui.screens.HeadScreen;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import meteordevelopment.meteorclient.gui.GuiThemes;
|
import meteordevelopment.meteorclient.gui.GuiThemes;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
|
||||||
import meteordevelopment.meteorclient.utils.Utils;
|
import meteordevelopment.meteorclient.utils.Utils;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import meteordevelopment.meteorclient.utils.player.ChatUtils;
|
import meteordevelopment.meteorclient.utils.player.ChatUtils;
|
||||||
import net.minecraft.client.util.GlfwUtil;
|
import net.minecraft.client.util.GlfwUtil;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
@@ -11,9 +11,8 @@ import net.minecraft.network.packet.s2c.play.DisconnectS2CPacket;
|
|||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import org.apache.commons.lang3.SystemUtils;
|
import org.apache.commons.lang3.SystemUtils;
|
||||||
|
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class KickCommand extends Command {
|
public class KickCommand extends Command {
|
||||||
|
|
||||||
@@ -21,6 +20,26 @@ public class KickCommand extends Command {
|
|||||||
super("kick", "Kick or disconnect yourself from the server", "disconnect", "quit");
|
super("kick", "Kick or disconnect yourself from the server", "disconnect", "quit");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void shutdown() throws Exception {
|
||||||
|
String cmd;
|
||||||
|
if (SystemUtils.IS_OS_AIX)
|
||||||
|
cmd = "shutdown -Fh 0";
|
||||||
|
else if (SystemUtils.IS_OS_FREE_BSD || SystemUtils.IS_OS_LINUX || SystemUtils.IS_OS_MAC || SystemUtils.IS_OS_MAC_OSX || SystemUtils.IS_OS_NET_BSD || SystemUtils.IS_OS_OPEN_BSD || SystemUtils.IS_OS_UNIX)
|
||||||
|
cmd = "shutdown -h now";
|
||||||
|
else if (SystemUtils.IS_OS_HP_UX)
|
||||||
|
cmd = "shutdown -hy 0";
|
||||||
|
else if (SystemUtils.IS_OS_IRIX)
|
||||||
|
cmd = "shutdown -y -g 0";
|
||||||
|
else if (SystemUtils.IS_OS_SOLARIS || SystemUtils.IS_OS_SUN_OS)
|
||||||
|
cmd = "shutdown -y -i5 -g 0";
|
||||||
|
else if (SystemUtils.IS_OS_WINDOWS)
|
||||||
|
cmd = "shutdown.exe /s /t 0";
|
||||||
|
else
|
||||||
|
throw new Exception("Unsupported operating system.");
|
||||||
|
|
||||||
|
Runtime.getRuntime().exec(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
||||||
builder.then(literal("disconnect").executes(ctx -> {
|
builder.then(literal("disconnect").executes(ctx -> {
|
||||||
@@ -52,25 +71,4 @@ public class KickCommand extends Command {
|
|||||||
return SINGLE_SUCCESS;
|
return SINGLE_SUCCESS;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void shutdown() throws Exception {
|
|
||||||
String cmd = "";
|
|
||||||
if (SystemUtils.IS_OS_AIX)
|
|
||||||
cmd = "shutdown -Fh 0";
|
|
||||||
else if (SystemUtils.IS_OS_FREE_BSD || SystemUtils.IS_OS_LINUX || SystemUtils.IS_OS_MAC || SystemUtils.IS_OS_MAC_OSX || SystemUtils.IS_OS_NET_BSD || SystemUtils.IS_OS_OPEN_BSD || SystemUtils.IS_OS_UNIX)
|
|
||||||
cmd = "shutdown -h now";
|
|
||||||
else if (SystemUtils.IS_OS_HP_UX)
|
|
||||||
cmd = "shutdown -hy 0";
|
|
||||||
else if (SystemUtils.IS_OS_IRIX)
|
|
||||||
cmd = "shutdown -y -g 0";
|
|
||||||
else if (SystemUtils.IS_OS_SOLARIS || SystemUtils.IS_OS_SUN_OS)
|
|
||||||
cmd = "shutdown -y -i5 -g 0";
|
|
||||||
else if (SystemUtils.IS_OS_WINDOWS)
|
|
||||||
cmd = "shutdown.exe /s /t 0";
|
|
||||||
else
|
|
||||||
throw new Exception("Unsupported operating system.");
|
|
||||||
|
|
||||||
Runtime.getRuntime().exec(cmd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import anticope.rejects.arguments.EnumArgumentType;
|
|||||||
import anticope.rejects.utils.WorldGenUtils;
|
import anticope.rejects.utils.WorldGenUtils;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
|
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import meteordevelopment.meteorclient.utils.Utils;
|
import meteordevelopment.meteorclient.utils.Utils;
|
||||||
import meteordevelopment.meteorclient.utils.player.ChatUtils;
|
import meteordevelopment.meteorclient.utils.player.ChatUtils;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
@@ -14,6 +14,7 @@ import net.minecraft.util.math.BlockPos;
|
|||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class LocateCommand extends Command {
|
public class LocateCommand extends Command {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import net.minecraft.client.gui.screen.ConnectScreen;
|
import net.minecraft.client.gui.screen.ConnectScreen;
|
||||||
import net.minecraft.client.gui.screen.TitleScreen;
|
import net.minecraft.client.gui.screen.TitleScreen;
|
||||||
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
|
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
|
||||||
@@ -10,6 +10,7 @@ import net.minecraft.client.network.ServerInfo;
|
|||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class ReconnectCommand extends Command {
|
public class ReconnectCommand extends Command {
|
||||||
public ReconnectCommand() {
|
public ReconnectCommand() {
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
import com.google.gson.*;
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import meteordevelopment.meteorclient.systems.commands.arguments.PlayerListEntryArgumentType;
|
import meteordevelopment.meteorclient.commands.arguments.PlayerListEntryArgumentType;
|
||||||
import meteordevelopment.meteorclient.utils.network.Http;
|
import meteordevelopment.meteorclient.utils.network.Http;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.lwjgl.BufferUtils;
|
import org.lwjgl.BufferUtils;
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
import anticope.rejects.arguments.EnumArgumentType;
|
import anticope.rejects.arguments.EnumArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
|
||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
|
||||||
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
|
||||||
|
|
||||||
import net.minecraft.command.CommandSource;
|
|
||||||
|
|
||||||
import com.seedfinding.mccore.version.MCVersion;
|
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
|
||||||
import anticope.rejects.utils.seeds.Seed;
|
import anticope.rejects.utils.seeds.Seed;
|
||||||
import anticope.rejects.utils.seeds.Seeds;
|
import anticope.rejects.utils.seeds.Seeds;
|
||||||
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
|
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
||||||
|
import com.seedfinding.mccore.version.MCVersion;
|
||||||
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import meteordevelopment.meteorclient.utils.Utils;
|
import meteordevelopment.meteorclient.utils.Utils;
|
||||||
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.text.MutableText;
|
import net.minecraft.text.MutableText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,27 @@
|
|||||||
package anticope.rejects.commands;
|
package anticope.rejects.commands;
|
||||||
|
|
||||||
|
import anticope.rejects.utils.portscanner.PScanRunner;
|
||||||
|
import anticope.rejects.utils.portscanner.PortScannerManager;
|
||||||
|
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||||
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
||||||
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import net.minecraft.client.network.ServerInfo;
|
import net.minecraft.client.network.ServerInfo;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.text.ClickEvent;
|
import net.minecraft.text.ClickEvent;
|
||||||
import net.minecraft.text.HoverEvent;
|
|
||||||
import net.minecraft.text.ClickEvent.Action;
|
import net.minecraft.text.ClickEvent.Action;
|
||||||
|
import net.minecraft.text.HoverEvent;
|
||||||
import net.minecraft.text.MutableText;
|
import net.minecraft.text.MutableText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
|
|
||||||
import anticope.rejects.utils.portscanner.PScanRunner;
|
|
||||||
import anticope.rejects.utils.portscanner.PortScannerManager;
|
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.Collection;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Ported from Cornos
|
Ported from Cornos
|
||||||
@@ -37,7 +32,7 @@ public class ServerCommand extends Command {
|
|||||||
private final static SimpleCommandExceptionType ADDRESS_ERROR = new SimpleCommandExceptionType(Text.literal("Couldn't obtain server address"));
|
private final static SimpleCommandExceptionType ADDRESS_ERROR = new SimpleCommandExceptionType(Text.literal("Couldn't obtain server address"));
|
||||||
private final static SimpleCommandExceptionType INVALID_RANGE = new SimpleCommandExceptionType(Text.literal("Invalid range"));
|
private final static SimpleCommandExceptionType INVALID_RANGE = new SimpleCommandExceptionType(Text.literal("Invalid range"));
|
||||||
|
|
||||||
private final static HashMap<Integer, String> ports = new HashMap<Integer, String>();
|
private final static HashMap<Integer, String> ports = new HashMap<>();
|
||||||
|
|
||||||
public ServerCommand() {
|
public ServerCommand() {
|
||||||
super("server", "Prints server information");
|
super("server", "Prints server information");
|
||||||
@@ -80,8 +75,7 @@ public class ServerCommand extends Command {
|
|||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
throw ADDRESS_ERROR.create();
|
throw ADDRESS_ERROR.create();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
ServerInfo server = mc.getCurrentServerEntry();
|
ServerInfo server = mc.getCurrentServerEntry();
|
||||||
if (server == null) throw ADDRESS_ERROR.create();
|
if (server == null) throw ADDRESS_ERROR.create();
|
||||||
try {
|
try {
|
||||||
@@ -134,7 +128,7 @@ public class ServerCommand extends Command {
|
|||||||
Text.literal("Open in browser")
|
Text.literal("Open in browser")
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
} else if (ports.get(port) == "DynMap") {
|
} else if (Objects.equals(ports.get(port), "DynMap")) {
|
||||||
text.setStyle(text.getStyle()
|
text.setStyle(text.getStyle()
|
||||||
.withClickEvent(new ClickEvent(
|
.withClickEvent(new ClickEvent(
|
||||||
ClickEvent.Action.OPEN_URL,
|
ClickEvent.Action.OPEN_URL,
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ package anticope.rejects.commands;
|
|||||||
|
|
||||||
import anticope.rejects.arguments.ClientPosArgumentType;
|
import anticope.rejects.arguments.ClientPosArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Commands;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.command.argument.BlockStateArgument;
|
import net.minecraft.command.argument.BlockStateArgument;
|
||||||
@@ -12,6 +11,7 @@ import net.minecraft.util.math.BlockPos;
|
|||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class SetBlockCommand extends Command {
|
public class SetBlockCommand extends Command {
|
||||||
public SetBlockCommand() {
|
public SetBlockCommand() {
|
||||||
@@ -20,7 +20,7 @@ public class SetBlockCommand extends Command {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
||||||
builder.then(argument("pos", ClientPosArgumentType.pos()).then(argument("block", BlockStateArgumentType.blockState(Commands.REGISTRY_ACCESS)).executes(ctx -> {
|
builder.then(argument("pos", ClientPosArgumentType.pos()).then(argument("block", BlockStateArgumentType.blockState(REGISTRY_ACCESS)).executes(ctx -> {
|
||||||
Vec3d pos = ClientPosArgumentType.getPos(ctx, "pos");
|
Vec3d pos = ClientPosArgumentType.getPos(ctx, "pos");
|
||||||
BlockState blockState = ctx.getArgument("block", BlockStateArgument.class).getBlockState();
|
BlockState blockState = ctx.getArgument("block", BlockStateArgument.class).getBlockState();
|
||||||
mc.world.setBlockState(new BlockPos((int) pos.getX(), (int) pos.getY(), (int) pos.getZ()), blockState);
|
mc.world.setBlockState(new BlockPos((int) pos.getX(), (int) pos.getY(), (int) pos.getZ()), blockState);
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ package anticope.rejects.commands;
|
|||||||
|
|
||||||
import com.mojang.brigadier.arguments.DoubleArgumentType;
|
import com.mojang.brigadier.arguments.DoubleArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class SetVelocityCommand extends Command {
|
public class SetVelocityCommand extends Command {
|
||||||
public SetVelocityCommand() {
|
public SetVelocityCommand() {
|
||||||
|
|||||||
@@ -3,11 +3,12 @@ package anticope.rejects.commands;
|
|||||||
import anticope.rejects.arguments.ClientPosArgumentType;
|
import anticope.rejects.arguments.ClientPosArgumentType;
|
||||||
import com.mojang.brigadier.arguments.FloatArgumentType;
|
import com.mojang.brigadier.arguments.FloatArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class TeleportCommand extends Command {
|
public class TeleportCommand extends Command {
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,10 @@ package anticope.rejects.commands;
|
|||||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
||||||
import meteordevelopment.meteorclient.systems.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
|
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
import org.lwjgl.BufferUtils;
|
import org.lwjgl.BufferUtils;
|
||||||
import org.lwjgl.PointerBuffer;
|
import org.lwjgl.PointerBuffer;
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
@@ -19,12 +17,12 @@ import java.io.IOException;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class TerrainExport extends Command {
|
public class TerrainExport extends Command {
|
||||||
|
|
||||||
private final PointerBuffer filters;
|
|
||||||
|
|
||||||
private final static SimpleCommandExceptionType IO_EXCEPTION = new SimpleCommandExceptionType(Text.literal("An IOException occurred"));
|
private final static SimpleCommandExceptionType IO_EXCEPTION = new SimpleCommandExceptionType(Text.literal("An IOException occurred"));
|
||||||
|
private final PointerBuffer filters;
|
||||||
|
|
||||||
public TerrainExport() {
|
public TerrainExport() {
|
||||||
super("terrain-export", "Export an area to the c++ terrain finder format (very popbob command).");
|
super("terrain-export", "Export an area to the c++ terrain finder format (very popbob command).");
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package anticope.rejects.mixin.meteor;
|
|||||||
import anticope.rejects.utils.accounts.AddCustomYggdrasilAccountScreen;
|
import anticope.rejects.utils.accounts.AddCustomYggdrasilAccountScreen;
|
||||||
import meteordevelopment.meteorclient.gui.GuiTheme;
|
import meteordevelopment.meteorclient.gui.GuiTheme;
|
||||||
import meteordevelopment.meteorclient.gui.WindowScreen;
|
import meteordevelopment.meteorclient.gui.WindowScreen;
|
||||||
import meteordevelopment.meteorclient.gui.screens.AccountsScreen;
|
import meteordevelopment.meteorclient.gui.screens.accounts.AccountsScreen;
|
||||||
import meteordevelopment.meteorclient.gui.widgets.WWidget;
|
import meteordevelopment.meteorclient.gui.widgets.WWidget;
|
||||||
import meteordevelopment.meteorclient.gui.widgets.containers.WContainer;
|
import meteordevelopment.meteorclient.gui.widgets.containers.WContainer;
|
||||||
import meteordevelopment.meteorclient.gui.widgets.containers.WHorizontalList;
|
import meteordevelopment.meteorclient.gui.widgets.containers.WHorizontalList;
|
||||||
@@ -25,7 +25,7 @@ public abstract class AccountsScreenMixin extends WindowScreen {
|
|||||||
@Shadow
|
@Shadow
|
||||||
protected abstract void addButton(WContainer c, String text, Runnable action);
|
protected abstract void addButton(WContainer c, String text, Runnable action);
|
||||||
|
|
||||||
@Inject(method = "initWidgets", at = @At(value = "INVOKE", target = "Lmeteordevelopment/meteorclient/gui/screens/AccountsScreen;addButton(Lmeteordevelopment/meteorclient/gui/widgets/containers/WContainer;Ljava/lang/String;Ljava/lang/Runnable;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
|
@Inject(method = "initWidgets", at = @At(value = "INVOKE", target = "Lmeteordevelopment/meteorclient/gui/screens/accounts/AccountsScreen;addButton(Lmeteordevelopment/meteorclient/gui/widgets/containers/WContainer;Ljava/lang/String;Ljava/lang/Runnable;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||||
private void afterAddCrackedButton(CallbackInfo info, WHorizontalList l) {
|
private void afterAddCrackedButton(CallbackInfo info, WHorizontalList l) {
|
||||||
addButton(l, "Yggdrasil", () -> mc.setScreen(new AddCustomYggdrasilAccountScreen(theme, (AccountsScreen) (Object) this)));
|
addButton(l, "Yggdrasil", () -> mc.setScreen(new AddCustomYggdrasilAccountScreen(theme, (AccountsScreen) (Object) this)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
package anticope.rejects.mixin.meteor.modules;
|
|
||||||
|
|
||||||
import anticope.rejects.utils.RejectsUtils;
|
|
||||||
import meteordevelopment.meteorclient.settings.DoubleSetting;
|
|
||||||
import meteordevelopment.meteorclient.settings.Setting;
|
|
||||||
import meteordevelopment.meteorclient.settings.SettingGroup;
|
|
||||||
import meteordevelopment.meteorclient.systems.modules.combat.AimAssist;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import org.spongepowered.asm.mixin.Final;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|
||||||
|
|
||||||
@Mixin(value = AimAssist.class, remap = false)
|
|
||||||
public class AimAssistMixin {
|
|
||||||
@Shadow @Final private SettingGroup sgGeneral;
|
|
||||||
|
|
||||||
private Setting<Double> fov;
|
|
||||||
|
|
||||||
@Inject(method = "<init>", at = @At("TAIL"))
|
|
||||||
private void onInit(CallbackInfo info) {
|
|
||||||
fov = sgGeneral.add(new DoubleSetting.Builder()
|
|
||||||
.name("fov")
|
|
||||||
.description("Will only aim entities in the fov.")
|
|
||||||
.defaultValue(360)
|
|
||||||
.min(0)
|
|
||||||
.max(360)
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Inject(method = "lambda$onTick$1", at = @At(value = "RETURN", ordinal = 5), cancellable = true)
|
|
||||||
private void onCheckEntity(Entity entity, CallbackInfoReturnable<Boolean> info) {
|
|
||||||
info.setReturnValue(RejectsUtils.inFov(entity, fov.get()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
163
src/main/java/anticope/rejects/modules/AimAssist.java
Normal file
163
src/main/java/anticope/rejects/modules/AimAssist.java
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
package anticope.rejects.modules;
|
||||||
|
|
||||||
|
import anticope.rejects.MeteorRejectsAddon;
|
||||||
|
import anticope.rejects.utils.RejectsUtils;
|
||||||
|
import it.unimi.dsi.fastutil.objects.Object2BooleanMap;
|
||||||
|
import meteordevelopment.meteorclient.events.render.Render3DEvent;
|
||||||
|
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||||
|
import meteordevelopment.meteorclient.settings.*;
|
||||||
|
import meteordevelopment.meteorclient.systems.friends.Friends;
|
||||||
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
|
import meteordevelopment.meteorclient.utils.Utils;
|
||||||
|
import meteordevelopment.meteorclient.utils.entity.EntityUtils;
|
||||||
|
import meteordevelopment.meteorclient.utils.entity.SortPriority;
|
||||||
|
import meteordevelopment.meteorclient.utils.entity.Target;
|
||||||
|
import meteordevelopment.meteorclient.utils.entity.TargetUtils;
|
||||||
|
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
|
||||||
|
import meteordevelopment.orbit.EventHandler;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityType;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
import org.joml.Vector3d;
|
||||||
|
|
||||||
|
public class AimAssist extends Module {
|
||||||
|
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||||
|
private final SettingGroup sgSpeed = settings.createGroup("Aim Speed");
|
||||||
|
|
||||||
|
// General
|
||||||
|
|
||||||
|
private final Setting<Object2BooleanMap<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
|
||||||
|
.name("entities")
|
||||||
|
.description("Entities to aim at.")
|
||||||
|
.defaultValue(EntityType.PLAYER)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
private final Setting<Double> range = sgGeneral.add(new DoubleSetting.Builder()
|
||||||
|
.name("range")
|
||||||
|
.description("The range at which an entity can be targeted.")
|
||||||
|
.defaultValue(5)
|
||||||
|
.min(0)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
private final Setting<Double> fov = sgGeneral.add(new DoubleSetting.Builder()
|
||||||
|
.name("fov")
|
||||||
|
.description("Will only aim entities in the fov.")
|
||||||
|
.defaultValue(360)
|
||||||
|
.min(0)
|
||||||
|
.max(360)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
private final Setting<Boolean> ignoreWalls = sgGeneral.add(new BoolSetting.Builder()
|
||||||
|
.name("ignore-walls")
|
||||||
|
.description("Whether or not to ignore aiming through walls.")
|
||||||
|
.defaultValue(false)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
private final Setting<SortPriority> priority = sgGeneral.add(new EnumSetting.Builder<SortPriority>()
|
||||||
|
.name("priority")
|
||||||
|
.description("How to filter targets within range.")
|
||||||
|
.defaultValue(SortPriority.LowestHealth)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
private final Setting<Target> bodyTarget = sgGeneral.add(new EnumSetting.Builder<Target>()
|
||||||
|
.name("aim-target")
|
||||||
|
.description("Which part of the entities body to aim at.")
|
||||||
|
.defaultValue(Target.Body)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Aim Speed
|
||||||
|
|
||||||
|
private final Setting<Boolean> instant = sgSpeed.add(new BoolSetting.Builder()
|
||||||
|
.name("instant-look")
|
||||||
|
.description("Instantly looks at the entity.")
|
||||||
|
.defaultValue(false)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
private final Setting<Double> speed = sgSpeed.add(new DoubleSetting.Builder()
|
||||||
|
.name("speed")
|
||||||
|
.description("How fast to aim at the entity.")
|
||||||
|
.defaultValue(5)
|
||||||
|
.min(0)
|
||||||
|
.visible(() -> !instant.get())
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
private final Vector3d vec3d1 = new Vector3d();
|
||||||
|
private Entity target;
|
||||||
|
|
||||||
|
public AimAssist() {
|
||||||
|
super(MeteorRejectsAddon.CATEGORY, "aim-assist", "Automatically aims at entities.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
private void onTick(TickEvent.Post event) {
|
||||||
|
target = TargetUtils.get(entity -> {
|
||||||
|
if (!entity.isAlive()) return false;
|
||||||
|
if (!PlayerUtils.isWithin(entity, range.get())) return false;
|
||||||
|
if (!ignoreWalls.get() && !PlayerUtils.canSeeEntity(entity)) return false;
|
||||||
|
if (entity == mc.player || !entities.get().getBoolean(entity.getType())) return false;
|
||||||
|
if (entity instanceof PlayerEntity) return Friends.get().shouldAttack((PlayerEntity) entity);
|
||||||
|
return RejectsUtils.inFov(entity, fov.get());
|
||||||
|
}, priority.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
private void onRender(Render3DEvent event) {
|
||||||
|
if (target != null) aim(target, event.tickDelta, instant.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void aim(Entity target, double delta, boolean instant) {
|
||||||
|
Utils.set(vec3d1, target, delta);
|
||||||
|
|
||||||
|
switch (bodyTarget.get()) {
|
||||||
|
case Head -> vec3d1.add(0, target.getEyeHeight(target.getPose()), 0);
|
||||||
|
case Body -> vec3d1.add(0, target.getEyeHeight(target.getPose()) / 2, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
double deltaX = vec3d1.x - mc.player.getX();
|
||||||
|
double deltaZ = vec3d1.z - mc.player.getZ();
|
||||||
|
double deltaY = vec3d1.y - (mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()));
|
||||||
|
|
||||||
|
// Yaw
|
||||||
|
double angle = Math.toDegrees(Math.atan2(deltaZ, deltaX)) - 90;
|
||||||
|
double deltaAngle;
|
||||||
|
double toRotate;
|
||||||
|
|
||||||
|
if (instant) {
|
||||||
|
mc.player.setYaw((float) angle);
|
||||||
|
} else {
|
||||||
|
deltaAngle = MathHelper.wrapDegrees(angle - mc.player.getYaw());
|
||||||
|
toRotate = speed.get() * (deltaAngle >= 0 ? 1 : -1) * delta;
|
||||||
|
if ((toRotate >= 0 && toRotate > deltaAngle) || (toRotate < 0 && toRotate < deltaAngle))
|
||||||
|
toRotate = deltaAngle;
|
||||||
|
mc.player.setYaw(mc.player.getYaw() + (float) toRotate);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pitch
|
||||||
|
double idk = Math.sqrt(deltaX * deltaX + deltaZ * deltaZ);
|
||||||
|
angle = -Math.toDegrees(Math.atan2(deltaY, idk));
|
||||||
|
|
||||||
|
if (instant) {
|
||||||
|
mc.player.setPitch((float) angle);
|
||||||
|
} else {
|
||||||
|
deltaAngle = MathHelper.wrapDegrees(angle - mc.player.getPitch());
|
||||||
|
toRotate = speed.get() * (deltaAngle >= 0 ? 1 : -1) * delta;
|
||||||
|
if ((toRotate >= 0 && toRotate > deltaAngle) || (toRotate < 0 && toRotate < deltaAngle))
|
||||||
|
toRotate = deltaAngle;
|
||||||
|
mc.player.setPitch(mc.player.getPitch() + (float) toRotate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getInfoString() {
|
||||||
|
return EntityUtils.getName(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package anticope.rejects.utils.accounts;
|
package anticope.rejects.utils.accounts;
|
||||||
|
|
||||||
import meteordevelopment.meteorclient.gui.GuiTheme;
|
import meteordevelopment.meteorclient.gui.GuiTheme;
|
||||||
import meteordevelopment.meteorclient.gui.screens.AccountsScreen;
|
import meteordevelopment.meteorclient.gui.screens.accounts.AccountsScreen;
|
||||||
import meteordevelopment.meteorclient.gui.screens.AddAccountScreen;
|
import meteordevelopment.meteorclient.gui.screens.accounts.AddAccountScreen;
|
||||||
import meteordevelopment.meteorclient.gui.widgets.containers.WTable;
|
import meteordevelopment.meteorclient.gui.widgets.containers.WTable;
|
||||||
import meteordevelopment.meteorclient.gui.widgets.input.WTextBox;
|
import meteordevelopment.meteorclient.gui.widgets.input.WTextBox;
|
||||||
import meteordevelopment.meteorclient.systems.accounts.Accounts;
|
import meteordevelopment.meteorclient.systems.accounts.Accounts;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
"ModuleMixin",
|
"ModuleMixin",
|
||||||
"ModulesMixin",
|
"ModulesMixin",
|
||||||
"WAccountMixin",
|
"WAccountMixin",
|
||||||
"modules.AimAssistMixin",
|
|
||||||
"modules.AutoSignMixin",
|
"modules.AutoSignMixin",
|
||||||
"modules.FlightMixin",
|
"modules.FlightMixin",
|
||||||
"modules.InventoryTweaksMixin",
|
"modules.InventoryTweaksMixin",
|
||||||
|
|||||||
Reference in New Issue
Block a user