diff --git a/src/main/java/thunder/hack/ThunderHack.java b/src/main/java/thunder/hack/ThunderHack.java index 0cf98b58..2ea4cdd2 100644 --- a/src/main/java/thunder/hack/ThunderHack.java +++ b/src/main/java/thunder/hack/ThunderHack.java @@ -87,7 +87,6 @@ public void onInitialize() { moduleManager.onLoad(); configManager.loadChestStealer(); configManager.loadInvCleaner(); - configManager.loadSearch(); configManager.loadNuker(); ThunderUtility.parseStarGazer(); @@ -99,7 +98,6 @@ public void onInitialize() { wayPointManager.saveWayPoints(); macroManager.saveMacro(); configManager.saveChestStealer(); - configManager.saveSearch(); configManager.saveNuker(); configManager.saveInvCleaner(); })); diff --git a/src/main/java/thunder/hack/cmd/args/WayPointArgumentType.java b/src/main/java/thunder/hack/cmd/args/WayPointArgumentType.java index ccd1e56d..2512c82d 100644 --- a/src/main/java/thunder/hack/cmd/args/WayPointArgumentType.java +++ b/src/main/java/thunder/hack/cmd/args/WayPointArgumentType.java @@ -18,7 +18,7 @@ public class WayPointArgumentType implements ArgumentType { private static final Collection EXAMPLES = ThunderHack.wayPointManager.getWayPoints().stream() - .map(WayPointManager.WayPoint::name) + .map(WayPointManager.WayPoint::getName) .limit(5) .toList(); @@ -39,11 +39,11 @@ public WayPointManager.WayPoint parse(StringReader reader) throws CommandSyntaxE @Override public CompletableFuture listSuggestions(CommandContext context, SuggestionsBuilder builder) { - return CommandSource.suggestMatching(ThunderHack.wayPointManager.getWayPoints().stream().map(WayPointManager.WayPoint::name), builder); + return CommandSource.suggestMatching(ThunderHack.wayPointManager.getWayPoints().stream().map(WayPointManager.WayPoint::getName), builder); } @Override public Collection getExamples() { return EXAMPLES; } -} +} \ No newline at end of file diff --git a/src/main/java/thunder/hack/cmd/impl/SearchCommand.java b/src/main/java/thunder/hack/cmd/impl/BlockESPCommand.java similarity index 75% rename from src/main/java/thunder/hack/cmd/impl/SearchCommand.java rename to src/main/java/thunder/hack/cmd/impl/BlockESPCommand.java index 07fed6ff..31a84099 100644 --- a/src/main/java/thunder/hack/cmd/impl/SearchCommand.java +++ b/src/main/java/thunder/hack/cmd/impl/BlockESPCommand.java @@ -8,22 +8,21 @@ import org.jetbrains.annotations.NotNull; import thunder.hack.cmd.Command; import thunder.hack.cmd.args.SearchArgumentType; -import thunder.hack.modules.render.Search; +import thunder.hack.core.impl.ModuleManager; import static com.mojang.brigadier.Command.SINGLE_SUCCESS; import static thunder.hack.modules.client.ClientSettings.isRu; -public class SearchCommand extends Command { - public SearchCommand() { - super("search"); +public class BlockESPCommand extends Command { + public BlockESPCommand() { + super("blockesp"); } @Override public void executeBuild(@NotNull LiteralArgumentBuilder builder) { builder.then(literal("reset").executes(context -> { - Search.defaultBlocks.clear(); - sendMessage("Search got reset."); - + ModuleManager.blockESP.selectedBlocks.getValue().clear(); + sendMessage(isRu() ? "Search был очищен!" : "Search got reset."); mc.worldRenderer.reload(); return SINGLE_SUCCESS; })); @@ -33,8 +32,8 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) Block result = getRegisteredBlock(blockName); if(result != null){ - Search.defaultBlocks.add(result); - sendMessage(Formatting.GREEN + blockName + (isRu() ? " добавлен в Search" : " added to Search")); + ModuleManager.blockESP.selectedBlocks.getValue().add(result); + sendMessage(Formatting.GREEN + blockName + (isRu() ? " добавлен в BlockESP" : " added to BlockESP")); } else { sendMessage(Formatting.RED + (isRu() ? "Такого блока нет!" : "There is no such block!")); } @@ -49,8 +48,8 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) Block result = getRegisteredBlock(blockName); if(result != null){ - Search.defaultBlocks.remove(result); - sendMessage(Formatting.GREEN + blockName + (isRu() ? " удален из Search" : " removed from Search")); + ModuleManager.blockESP.selectedBlocks.getValue().remove(result); + sendMessage(Formatting.GREEN + blockName + (isRu() ? " удален из BlockESP" : " removed from BlockESP")); } else { sendMessage(Formatting.RED + (isRu() ? "Такого блока нет!" : "There is no such block!")); } @@ -61,14 +60,14 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) }))); builder.executes(context -> { - if (Search.defaultBlocks.isEmpty()) { + if (ModuleManager.blockESP.selectedBlocks.getValue().getItemsById().isEmpty()) { sendMessage("Search list empty"); } else { StringBuilder f = new StringBuilder("Search list: "); - for (Block name : Search.defaultBlocks) + for (String name : ModuleManager.blockESP.selectedBlocks.getValue().getItemsById()) try { - f.append(name.getTranslationKey().replace("block.minecraft.","")).append(", "); + f.append(name).append(", "); } catch (Exception ignored) { } diff --git a/src/main/java/thunder/hack/cmd/impl/WayPointCommand.java b/src/main/java/thunder/hack/cmd/impl/WayPointCommand.java index 1d0199aa..6066f717 100644 --- a/src/main/java/thunder/hack/cmd/impl/WayPointCommand.java +++ b/src/main/java/thunder/hack/cmd/impl/WayPointCommand.java @@ -13,6 +13,7 @@ import thunder.hack.modules.client.ClientSettings; import static com.mojang.brigadier.Command.SINGLE_SUCCESS; +import static thunder.hack.modules.Module.mc; public class WayPointCommand extends Command { public WayPointCommand() { @@ -26,7 +27,7 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) else sendMessage("WayPoints:"); sendMessage(" "); - ThunderHack.wayPointManager.getWayPoints().forEach(wp -> sendMessage(wp.name() + "X: " + wp.x() + " Y: " + wp.y() + " Z: " + wp.z() + " Server: " + wp.server())); + ThunderHack.wayPointManager.getWayPoints().forEach(wp -> sendMessage(wp.getName() + " X: " + wp.getX() + " Y: " + wp.getY() + " Z: " + wp.getZ() + " Server: " + wp.getServer() + " Dimension: " + wp.getDimension())); return SINGLE_SUCCESS; })); @@ -37,9 +38,9 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) ThunderHack.wayPointManager.removeWayPoint(wp); if (ClientSettings.language.getValue() == ClientSettings.Language.RU) { - sendMessage("Удалена метка " + wp.name()); + sendMessage("Удалена метка " + wp.getName()); } else { - sendMessage("Removed waypoint " + wp.name()); + sendMessage("Removed waypoint " + wp.getName()); } return SINGLE_SUCCESS; @@ -47,7 +48,7 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) builder.then(literal("add").then(arg("name", StringArgumentType.word()).executes(context -> { String name = context.getArgument("name", String.class); - WayPointManager.WayPoint wp = new WayPointManager.WayPoint((int) mc.player.getX(), (int) mc.player.getY(), (int) mc.player.getZ(), name, (mc.isInSingleplayer() ? "SinglePlayer" : mc.getNetworkHandler().getServerInfo().address)); + WayPointManager.WayPoint wp = new WayPointManager.WayPoint((int) mc.player.getX(), (int) mc.player.getY(), (int) mc.player.getZ(), name, (mc.isInSingleplayer() ? "SinglePlayer" : mc.getNetworkHandler().getServerInfo().address), mc.world.getRegistryKey().getValue().getPath()); ThunderHack.wayPointManager.addWayPoint(wp); if (ClientSettings.language.getValue() == ClientSettings.Language.RU) { @@ -63,7 +64,7 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) String name = context.getArgument("name", String.class); BlockPos pos = new BlockPos(context.getArgument("x", Integer.class), context.getArgument("y", Integer.class), context.getArgument("z", Integer.class)); - WayPointManager.WayPoint wp = new WayPointManager.WayPoint(pos.getX(), pos.getY(), pos.getZ(), name, (mc.isInSingleplayer() ? "SinglePlayer" : mc.getNetworkHandler().getServerInfo().address)); + WayPointManager.WayPoint wp = new WayPointManager.WayPoint(pos.getX(), pos.getY(), pos.getZ(), name, (mc.isInSingleplayer() ? "SinglePlayer" : mc.getNetworkHandler().getServerInfo().address), mc.world.getRegistryKey().getValue().getPath()); ThunderHack.wayPointManager.addWayPoint(wp); if (ClientSettings.language.getValue() == ClientSettings.Language.RU) { @@ -73,7 +74,7 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) } return SINGLE_SUCCESS; - })))))); // macro remove. // eclip bedrock // waypoints + })))))); builder.executes(context -> { sendMessage(usage()); @@ -85,4 +86,4 @@ public void executeBuild(@NotNull LiteralArgumentBuilder builder) String usage() { return "waypoint add/remove/list (waypoint add x y z name), (waypoint remove name)"; } -} +} \ No newline at end of file diff --git a/src/main/java/thunder/hack/core/impl/CommandManager.java b/src/main/java/thunder/hack/core/impl/CommandManager.java index 24530c39..d7e21c16 100644 --- a/src/main/java/thunder/hack/core/impl/CommandManager.java +++ b/src/main/java/thunder/hack/core/impl/CommandManager.java @@ -1,7 +1,6 @@ package thunder.hack.core.impl; import com.mojang.brigadier.CommandDispatcher; -import com.mojang.brigadier.builder.LiteralArgumentBuilder; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientCommandSource; import net.minecraft.command.CommandSource; @@ -40,7 +39,7 @@ public CommandManager() { add(new FriendCommand()); add(new ModuleCommand()); add(new PrefixCommand()); - add(new SearchCommand()); + add(new BlockESPCommand()); add(new TrackerCommand()); add(new DropAllCommand()); add(new TreasureCommand()); diff --git a/src/main/java/thunder/hack/core/impl/ConfigManager.java b/src/main/java/thunder/hack/core/impl/ConfigManager.java index e09be80f..ca0b6e00 100644 --- a/src/main/java/thunder/hack/core/impl/ConfigManager.java +++ b/src/main/java/thunder/hack/core/impl/ConfigManager.java @@ -1,30 +1,22 @@ package thunder.hack.core.impl; import com.google.gson.*; -import com.mojang.logging.LogUtils; import net.minecraft.block.Block; -import net.minecraft.util.Pair; -import org.apache.commons.io.IOUtils; import org.jetbrains.annotations.NotNull; import thunder.hack.ThunderHack; import thunder.hack.cmd.Command; import thunder.hack.cmd.impl.NukerCommand; -import thunder.hack.cmd.impl.SearchCommand; +import thunder.hack.cmd.impl.BlockESPCommand; import thunder.hack.core.IManager; import thunder.hack.modules.Module; -import thunder.hack.modules.client.ClientSettings; import thunder.hack.modules.misc.Nuker; -import thunder.hack.modules.render.Search; +import thunder.hack.modules.render.BlockESP; import thunder.hack.setting.Setting; import thunder.hack.setting.impl.*; -import thunder.hack.utility.player.InventoryUtility; import java.io.*; import java.net.URL; import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; @@ -63,19 +55,6 @@ public ConfigManager() { if (!STASHLOGGER_FOLDER.exists()) STASHLOGGER_FOLDER.mkdirs(); } - public void loadSearch() { - try { - File file = new File(CONFIG_FOLDER_NAME + "/misc/search.txt"); - - if (file.exists()) - try (BufferedReader reader = new BufferedReader(new FileReader(file))) { - while (reader.ready()) - Search.defaultBlocks.add(SearchCommand.getRegisteredBlock(reader.readLine())); - } - } catch (Exception ignored) { - } - } - public void loadNuker() { try { File file = new File(CONFIG_FOLDER_NAME + "/misc/nuker.txt"); @@ -90,21 +69,6 @@ public void loadNuker() { } } - public void saveSearch() { - File file = new File(CONFIG_FOLDER_NAME + "/misc/search.txt"); - try { - new File(CONFIG_FOLDER_NAME).mkdirs(); - file.createNewFile(); - } catch (Exception ignored) { - } - - try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) { - for (Block name : Search.defaultBlocks) { - writer.write(name.getTranslationKey() + "\n"); - } - } catch (Exception ignored) { - } - } public void saveNuker() { File file = new File(CONFIG_FOLDER_NAME + "/misc/nuker.txt"); diff --git a/src/main/java/thunder/hack/core/impl/ModuleManager.java b/src/main/java/thunder/hack/core/impl/ModuleManager.java index 9f7b7045..ff78384c 100644 --- a/src/main/java/thunder/hack/core/impl/ModuleManager.java +++ b/src/main/java/thunder/hack/core/impl/ModuleManager.java @@ -220,7 +220,7 @@ public class ModuleManager implements IManager { public static Trails trails = new Trails(); public static Strafe strafe = new Strafe(); public static Spider spider = new Spider(); - public static Search search = new Search(); + public static BlockESP blockESP = new BlockESP(); public static NoSlow noSlow = new NoSlow(); public static NoFall noFall = new NoFall(); public static Hotbar hotbar = new Hotbar(); diff --git a/src/main/java/thunder/hack/core/impl/WayPointManager.java b/src/main/java/thunder/hack/core/impl/WayPointManager.java index c33b8724..33be7d39 100644 --- a/src/main/java/thunder/hack/core/impl/WayPointManager.java +++ b/src/main/java/thunder/hack/core/impl/WayPointManager.java @@ -8,16 +8,15 @@ public class WayPointManager implements IManager { private static CopyOnWriteArrayList wayPoints = new CopyOnWriteArrayList<>(); - public void addWayPoint(WayPoint macro) { - if (!wayPoints.contains(macro)) { - wayPoints.add(macro); - } + public void addWayPoint(WayPoint wp) { + if (!wayPoints.contains(wp)) + wayPoints.add(wp); } public void onLoad() { wayPoints = new CopyOnWriteArrayList<>(); try { - File file = new File(ConfigManager.MAIN_FOLDER + "/misc/waypoints.txt"); + File file = new File(ConfigManager.MISC_FOLDER + "waypoints.txt"); if (file.exists()) { try (BufferedReader reader = new BufferedReader(new FileReader(file))) { @@ -28,8 +27,9 @@ public void onLoad() { String z = line[2]; String name = line[3]; String server = line[4]; + String dimension = line.length == 6 ? line[5] : "overworld"; - addWayPoint(new WayPoint(Integer.parseInt(x), Integer.parseInt(y), Integer.parseInt(z), name, server)); + addWayPoint(new WayPoint(Integer.parseInt(x), Integer.parseInt(y), Integer.parseInt(z), name, server, dimension)); } } } @@ -39,15 +39,15 @@ public void onLoad() { @SuppressWarnings("ResultOfMethodCallIgnored") public void saveWayPoints() { - File file = new File(ConfigManager.MAIN_FOLDER + "/misc/waypoints.txt"); + File file = new File(ConfigManager.CONFIG_FOLDER_NAME + "/misc/waypoints.txt"); try { - new File("config/"+ConfigManager.CONFIG_FOLDER_NAME).mkdirs(); + new File(ConfigManager.CONFIG_FOLDER_NAME).mkdirs(); file.createNewFile(); } catch (Exception ignored) { } try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) { for (WayPoint wayPoint : wayPoints) { - writer.write(wayPoint.x + ":" + wayPoint.y + ":" + wayPoint.z + ":" + wayPoint.name + ":" + wayPoint.server + "\n"); + writer.write(wayPoint.x + ":" + wayPoint.y + ":" + wayPoint.z + ":" + wayPoint.name + ":" + wayPoint.server + ":" + wayPoint.dimension + "\n"); } } catch (Exception ignored) { } @@ -62,14 +62,73 @@ public CopyOnWriteArrayList getWayPoints() { } public WayPoint getWayPointByName(String name) { - for (WayPoint wayPoint : getWayPoints()) { - if (wayPoint.name.equalsIgnoreCase(name)) { + for (WayPoint wayPoint : getWayPoints()) + if (wayPoint.name.equalsIgnoreCase(name)) return wayPoint; - } - } return null; } - public record WayPoint(int x, int y, int z, String name, String server) { + + public static class WayPoint { + + private int x, y, z; + private String name, server, dimension; + + public WayPoint(int x, int y, int z, String name, String server, String dimension) { + this.x = x; + this.y = y; + this.z = z; + this.name = name; + this.server = server; + this.dimension = dimension; + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getZ() { + return z; + } + + public void setZ(int z) { + this.z = z; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getServer() { + return server; + } + + public void setServer(String server) { + this.server = server; + } + + public String getDimension() { + return dimension; + } + + public void setDimension(String dimension) { + this.dimension = dimension; + } } -} +} \ No newline at end of file diff --git a/src/main/java/thunder/hack/gui/windows/WindowBase.java b/src/main/java/thunder/hack/gui/windows/WindowBase.java index 921e593a..bf06a603 100644 --- a/src/main/java/thunder/hack/gui/windows/WindowBase.java +++ b/src/main/java/thunder/hack/gui/windows/WindowBase.java @@ -3,10 +3,9 @@ import com.mojang.blaze3d.systems.RenderSystem; import net.minecraft.client.gui.DrawContext; import net.minecraft.util.Colors; -import thunder.hack.cmd.Command; -import thunder.hack.core.impl.CombatManager; import thunder.hack.gui.font.FontRenderers; import thunder.hack.modules.client.HudEditor; +import thunder.hack.utility.math.MathUtility; import thunder.hack.utility.render.Render2DEngine; import thunder.hack.utility.render.Render3DEngine; import thunder.hack.utility.render.animation.AnimationUtility; @@ -16,9 +15,18 @@ import static thunder.hack.core.IManager.mc; public class WindowBase { - private float x, y, width, height, dragX, dragY, scrollOffset, prevScrollOffset; + private float x; + private float y; + private float width; + private float height; + private float dragX; + private float dragY; + private float scrollOffset; + private float prevScrollOffset; + + private float maxElementsHeight; private final String name; - private boolean mouseState, dragging, hoveringWindow, scaling; + private boolean dragging, hoveringWindow, scaling, scrolling; protected WindowBase(float x, float y, float width, float height, String name) { setX(x); @@ -34,20 +42,23 @@ protected void render(DrawContext context, int mouseX, int mouseY) { RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); - Render2DEngine.drawHudBase(context.getMatrices(), x, y, width, height, 1, false); - Render2DEngine.drawRectWithOutline(context.getMatrices(), x + 0.5f, y, width - 1, 16, new Color(0x5F000000, true), color2); + Render2DEngine.drawHudBase(context.getMatrices(), x, y, width + 10, height, 1, false); + Render2DEngine.drawRect(context.getMatrices(), x + 0.5f, y, width + 9, 16, new Color(0x5F000000, true)); Render2DEngine.horizontalGradient(context.getMatrices(), x + 2, y + 16f, x + 2 + width / 2f - 2, y + 16.5f, Render2DEngine.injectAlpha(HudEditor.textColor.getValue().getColorObject(), 0), HudEditor.textColor.getValue().getColorObject()); Render2DEngine.horizontalGradient(context.getMatrices(), x + 2 + width / 2f - 2, y + 16f, x + 2 + width - 4, y + 16.5f, HudEditor.textColor.getValue().getColorObject(), Render2DEngine.injectAlpha(HudEditor.textColor.getValue().getColorObject(), 0)); FontRenderers.sf_medium.drawString(context.getMatrices(), name, x + 4, y + 5.5f, -1); - boolean hover1 = Render2DEngine.isHovered(mouseX, mouseY, x + width - 14, y + 3, 10, 10); - Render2DEngine.drawRectWithOutline(context.getMatrices(), x + width - 14, y + 3, 10, 10, hover1 ? new Color(0xC5777777, true) : new Color(0xC5575757, true), color2); + boolean hover1 = Render2DEngine.isHovered(mouseX, mouseY, x + width - 4, y + 3, 10, 10); + Render2DEngine.drawRectWithOutline(context.getMatrices(), x + width - 4, y + 3, 10, 10, hover1 ? new Color(0xC5777777, true) : new Color(0xC5575757, true), color2); - Render2DEngine.drawLine(x + width - 12, y + 5, x + width - 6, y + 11, Colors.WHITE); - Render2DEngine.drawLine(x + width - 12, y + 11, x + width - 6, y + 5, Colors.WHITE); - RenderSystem.disableBlend(); + float ratio = (getHeight() - 35) / maxElementsHeight; + + boolean hover2 = Render2DEngine.isHovered(mouseX, mouseY, x + width, y + 19, 6, getHeight() - 34); + Render2DEngine.drawRectWithOutline(context.getMatrices(), x + width, y + 19, 6, getHeight() - 34, hover2 ? new Color(0x5F131313, true) : new Color(0x5F000000, true), color2); + Render2DEngine.drawRect(context.getMatrices(), x + width, Math.max(y + 19 - (scrollOffset * ratio), y + 19), 6, Math.min((getHeight() - 34) * ratio, getHeight() - 34), new Color(0xA1313131, true)); - // boolean hover2 = Render2DEngine.isHovered(mouseX, mouseY, x + width - 14, y + 3, 10, 10); - // Render2DEngine.drawRect(context.getMatrices(), x + width - 7, y + 23, 4, height - 20, hover2 ? new Color(0xC5777777, true) : new Color(0xC5575757, true)); + Render2DEngine.drawLine(x + width - 2, y + 5, x + width + 4, y + 11, Colors.WHITE); + Render2DEngine.drawLine(x + width - 2, y + 11, x + width + 4, y + 5, Colors.WHITE); + RenderSystem.disableBlend(); if (dragging) { setX(Render2DEngine.scrollAnimate((normaliseX() - dragX), getX(), .15f)); @@ -55,15 +66,20 @@ protected void render(DrawContext context, int mouseX, int mouseY) { } if (scaling) { - setWidth(Math.max(Render2DEngine.scrollAnimate((normaliseX() - dragX), getWidth(), .15f), 150)); - setHeight(Math.max(Render2DEngine.scrollAnimate((normaliseY() - dragY), getHeight(), .15f), 150)); + setWidth(Math.max(Render2DEngine.scrollAnimate((normaliseX() - dragX), getWidth(), .15f), getMinWidth())); + setHeight(Math.max(Render2DEngine.scrollAnimate((normaliseY() - dragY), getHeight(), .15f), getMinHeight())); } - hoveringWindow = Render2DEngine.isHovered(mouseX, mouseY, getX(), getY(), getWidth(), getHeight()); + if (scrolling) { + float diff = ((float) mouseY - y - 19) / (getHeight() - 34); + scrollOffset = -(diff * maxElementsHeight); + scrollOffset = MathUtility.clamp(scrollOffset, -maxElementsHeight + (getHeight() - 40), 0); + } - Render2DEngine.drawLine(getX() + getWidth() - 10,getY() + getHeight() - 3, getX() + getWidth() - 3, getY() + getHeight() - 10, color2.getRGB()); - Render2DEngine.drawLine(getX() + getWidth() - 5,getY() + getHeight() - 3, getX() + getWidth() - 3, getY() + getHeight() - 5, color2.getRGB()); + hoveringWindow = Render2DEngine.isHovered(mouseX, mouseY, getX(), getY(), getWidth(), getHeight()); + Render2DEngine.drawLine(getX() + getWidth(), getY() + getHeight() - 3, getX() + getWidth() + 7, getY() + getHeight() - 10, color2.getRGB()); + Render2DEngine.drawLine(getX() + getWidth() + 5, getY() + getHeight() - 3, getX() + getWidth() + 7, getY() + getHeight() - 5, color2.getRGB()); } protected void mouseClicked(double mouseX, double mouseY, int button) { @@ -77,13 +93,22 @@ protected void mouseClicked(double mouseX, double mouseY, int button) { WindowsScreen.lastClickedWindow = this; dragX = (int) (mouseX - getX()); dragY = (int) (mouseY - getY()); + return; } - if (Render2DEngine.isHovered(mouseX, mouseY, x + width - 10, y + height - 10, 10, 10)) { + if (Render2DEngine.isHovered(mouseX, mouseY, x + width, y + height - 10, 10, 10)) { WindowsScreen.lastClickedWindow = this; dragX = (int) (mouseX - getWidth()); dragY = (int) (mouseY - getHeight()); scaling = true; + return; + } + + if (Render2DEngine.isHovered(mouseX, mouseY, x + width, y + 19, 6, getHeight() - 34)) { + WindowsScreen.lastClickedWindow = this; + dragX = (int) (mouseX - getWidth()); + dragY = (int) (mouseY - getHeight()); + scrolling = true; } } @@ -96,13 +121,14 @@ protected void charTyped(char key, int keyCode) { protected void mouseScrolled(int i) { if (hoveringWindow) { scrollOffset += i * 2; - scrollOffset = Math.min(scrollOffset, 0); + scrollOffset = MathUtility.clamp(scrollOffset, -maxElementsHeight + (getHeight() - 40), 0); } } public void mouseReleased(double mouseX, double mouseY, int button) { dragging = false; scaling = false; + scrolling = false; WindowsScreen.draggingWindow = null; } @@ -154,4 +180,16 @@ protected void resetScroll() { prevScrollOffset = 0; scrollOffset = 0; } + + protected int getMinWidth() { + return 150; + } + + protected int getMinHeight() { + return 150; + } + + protected void setMaxElementsHeight(float maxElementsHeight) { + this.maxElementsHeight = maxElementsHeight; + } } \ No newline at end of file diff --git a/src/main/java/thunder/hack/gui/windows/impl/ConfigWindow.java b/src/main/java/thunder/hack/gui/windows/impl/ConfigWindow.java index 2ea2c175..69efc389 100644 --- a/src/main/java/thunder/hack/gui/windows/impl/ConfigWindow.java +++ b/src/main/java/thunder/hack/gui/windows/impl/ConfigWindow.java @@ -3,6 +3,7 @@ import com.google.common.collect.Lists; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.util.InputUtil; +import net.minecraft.util.StringHelper; import org.lwjgl.glfw.GLFW; import thunder.hack.ThunderHack; import thunder.hack.core.impl.StringHelperUpdated; @@ -10,8 +11,10 @@ import thunder.hack.gui.clickui.impl.SliderElement; import thunder.hack.gui.font.FontRenderers; import thunder.hack.gui.windows.WindowBase; +import thunder.hack.gui.windows.WindowsScreen; import thunder.hack.modules.client.HudEditor; import thunder.hack.utility.render.Render2DEngine; +import thunder.hack.utility.render.animation.AnimationUtility; import java.awt.*; import java.util.ArrayList; @@ -59,7 +62,6 @@ public void render(DrawContext context, int mouseX, int mouseY) { if (configPlates.isEmpty()) { FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), isRu() ? "Тут пока пусто" : "It's empty here yet", getX() + getWidth() / 2f, getY() + getHeight() / 2f, new Color(0xBDBDBD).getRGB()); - return; } String blink = (System.currentTimeMillis() / 240) % 2 == 0 ? "" : " <<<<"; @@ -81,6 +83,7 @@ public void render(DrawContext context, int mouseX, int mouseY) { Render2DEngine.horizontalGradient(context.getMatrices(), getX() + 2, getY() + 33f, getX() + 2 + getWidth() / 2f - 2, getY() + 33.5f, Render2DEngine.injectAlpha(HudEditor.textColor.getValue().getColorObject(), 0), HudEditor.textColor.getValue().getColorObject()); Render2DEngine.horizontalGradient(context.getMatrices(), getX() + 2 + getWidth() / 2f - 2, getY() + 33f, getX() + 2 + getWidth() - 4, getY() + 33.5f, HudEditor.textColor.getValue().getColorObject(), Render2DEngine.injectAlpha(HudEditor.textColor.getValue().getColorObject(), 0)); + Render2DEngine.addWindow(context.getMatrices(), getX(), getY() + 38, getX() + getWidth(), getY() + getHeight() - 1, 1f); int id = 0; for (ConfigPlate configPlate : configPlates) { id++; @@ -103,6 +106,8 @@ public void render(DrawContext context, int mouseX, int mouseY) { FontRenderers.icons.drawString(context.getMatrices(), "w", getX() + getWidth() - 15, configPlate.offset + getY() + 40 + getScrollOffset(), -1); FontRenderers.sf_medium_mini.drawString(context.getMatrices(), id + ".", getX() + 3, configPlate.offset + getY() + 41 + getScrollOffset(), textColor); } + setMaxElementsHeight(configPlates.size() * 20); + Render2DEngine.popWindow(); } @Override diff --git a/src/main/java/thunder/hack/gui/windows/impl/FriendsWindow.java b/src/main/java/thunder/hack/gui/windows/impl/FriendsWindow.java index 206606da..f2a5d063 100644 --- a/src/main/java/thunder/hack/gui/windows/impl/FriendsWindow.java +++ b/src/main/java/thunder/hack/gui/windows/impl/FriendsWindow.java @@ -3,6 +3,7 @@ import com.google.common.collect.Lists; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.util.InputUtil; +import net.minecraft.util.StringHelper; import org.lwjgl.glfw.GLFW; import thunder.hack.ThunderHack; import thunder.hack.core.impl.StringHelperUpdated; @@ -10,6 +11,7 @@ import thunder.hack.gui.clickui.impl.SliderElement; import thunder.hack.gui.font.FontRenderers; import thunder.hack.gui.windows.WindowBase; +import thunder.hack.gui.windows.WindowsScreen; import thunder.hack.modules.client.HudEditor; import thunder.hack.utility.render.Render2DEngine; @@ -58,7 +60,6 @@ public void render(DrawContext context, int mouseX, int mouseY) { if (friendPlates.isEmpty()) { FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), isRu() ? "Тут пока пусто" : "It's empty here yet", getX() + getWidth() / 2f, getY() + getHeight() / 2f, new Color(0xBDBDBD).getRGB()); - return; } String blink2 = (System.currentTimeMillis() / 240) % 2 == 0 ? "" : "l"; @@ -99,7 +100,7 @@ public void render(DrawContext context, int mouseX, int mouseY) { FontRenderers.icons.drawString(context.getMatrices(), "w", getX() + getWidth() - 15, friendPlate.offset + getY() + 40 + getScrollOffset(), -1); FontRenderers.sf_medium_mini.drawString(context.getMatrices(), id + ".", getX() + 3, friendPlate.offset + getY() + 41 + getScrollOffset(), textColor); } - + setMaxElementsHeight(friendPlates.size() * 20); Render2DEngine.popWindow(); } diff --git a/src/main/java/thunder/hack/gui/windows/impl/ItemSelectWindow.java b/src/main/java/thunder/hack/gui/windows/impl/ItemSelectWindow.java index 544c8672..3042d390 100644 --- a/src/main/java/thunder/hack/gui/windows/impl/ItemSelectWindow.java +++ b/src/main/java/thunder/hack/gui/windows/impl/ItemSelectWindow.java @@ -5,12 +5,15 @@ import net.minecraft.block.Block; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.render.*; +import net.minecraft.client.resource.language.I18n; import net.minecraft.client.util.InputUtil; import net.minecraft.item.Item; import net.minecraft.registry.Registries; import net.minecraft.util.Formatting; +import net.minecraft.util.StringHelper; import org.lwjgl.glfw.GLFW; import thunder.hack.ThunderHack; +import thunder.hack.cmd.Command; import thunder.hack.core.impl.StringHelperUpdated; import thunder.hack.gui.clickui.ClickGUI; import thunder.hack.gui.clickui.impl.SliderElement; @@ -47,12 +50,12 @@ public ItemSelectWindow(float x, float y, float width, float height, Setting getY() + getHeight() || itemPlate.offset + getScrollOffset() + getY() + 10 < getY()) @@ -106,14 +108,14 @@ public void render(DrawContext context, int mouseX, int mouseY) { context.drawItem(itemPlate.item().getDefaultStack(), 0, 0); context.getMatrices().pop(); - FontRenderers.sf_medium.drawString(context.getMatrices(), itemPlate.item().getName().getString(), getX() + 26, itemPlate.offset + getY() + 38 + getScrollOffset(), new Color(0xBDBDBD).getRGB()); + FontRenderers.sf_medium.drawString(context.getMatrices(), I18n.translate(itemPlate.key()), getX() + 26, itemPlate.offset + getY() + 38 + getScrollOffset(), new Color(0xBDBDBD).getRGB()); boolean hover2 = Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 20, itemPlate.offset + getY() + 35 + getScrollOffset(), 11, 11); Render2DEngine.drawRect(context.getMatrices(), getX() + getWidth() - 20, itemPlate.offset + getY() + 35 + getScrollOffset(), 11, 11, hover2 ? new Color(0xC57A7A7A, true) : new Color(0xC5575757, true)); - boolean selected = itemPlates.stream().anyMatch(sI -> sI.item == itemPlate.item); + boolean selected = itemPlates.stream().anyMatch(sI -> Objects.equals(sI.key, itemPlate.key)); if (allTab && !selected) { FontRenderers.categories.drawString(context.getMatrices(), "+", getX() + getWidth() - 17, itemPlate.offset + getY() + 39 + getScrollOffset(), -1); @@ -121,13 +123,14 @@ public void render(DrawContext context, int mouseX, int mouseY) { FontRenderers.icons.drawString(context.getMatrices(), "w", getX() + getWidth() - 19.5f, itemPlate.offset + getY() + 39 + getScrollOffset(), -1); } } - + setMaxElementsHeight((allTab ? allItems : itemPlates).size() * 20); Render2DEngine.popWindow(); } @Override public void mouseClicked(double mouseX, double mouseY, int button) { super.mouseClicked(mouseX, mouseY, button); + if (Render2DEngine.isHovered(mouseX, mouseY, getX() + 8, getY() + 19, 52, 19)) { allTab = true; resetScroll(); @@ -153,10 +156,10 @@ public void mouseClicked(double mouseX, double mouseY, int button) { if ((int) (itemPlate.offset + getY() + 50) + getScrollOffset() > getY() + getHeight()) continue; - String name = itemPlate.item().getTranslationKey().replace("item.minecraft.", "").replace("block.minecraft.", ""); + String name = itemPlate.key().replace("item.minecraft.", "").replace("block.minecraft.", ""); if (Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 20, itemPlate.offset + getY() + 35 + getScrollOffset(), 10, 10)) { - boolean selected = itemPlates.stream().anyMatch(sI -> sI.item == itemPlate.item); + boolean selected = itemPlates.stream().anyMatch(sI -> Objects.equals(sI.key(), itemPlate.key)); if (allTab && !selected) { if (itemSetting.getValue().getItemsById().contains(name)) @@ -211,15 +214,22 @@ public void charTyped(char key, int keyCode) { } - private void refreshItemPlates() { - itemSetting.getValue().updateItems(); itemPlates.clear(); + int id = 0; - for (Item s : itemSetting.getValue().getItems()) { - itemPlates.add(new ItemPlate(id, id * 20, s)); - id++; + for (Block block : Registries.BLOCK) { + if (itemSetting.getValue().getItemsById().contains(block.getTranslationKey().replace("block.minecraft.", ""))) { + itemPlates.add(new ItemPlate(id, id * 20, block.asItem(), block.getTranslationKey())); + id++; + } } + + for (Item item : Registries.ITEM) + if (itemSetting.getValue().getItemsById().contains(item.getTranslationKey().replace("item.minecraft.", ""))) { + itemPlates.add(new ItemPlate(id, id * 20, item, item.getTranslationKey())); + id++; + } } private void refreshAllItems() { @@ -227,20 +237,20 @@ private void refreshAllItems() { resetScroll(); int id1 = 0; for (Block block : Registries.BLOCK) { - if (search.equals("Search") || search.isEmpty() || block.asItem().getTranslationKey().contains(search) || block.asItem().getName().getString().toLowerCase().contains(search.toLowerCase())) { - allItems.add(new ItemPlate(id1, id1 * 20, block.asItem())); + if (search.equals("Search") || search.isEmpty() || block.getTranslationKey().contains(search) || I18n.translate(block.getTranslationKey()).toLowerCase().contains(search.toLowerCase())) { + allItems.add(new ItemPlate(id1, id1 * 20, block.asItem(), block.getTranslationKey())); id1++; } } for (Item item : Registries.ITEM) { if (search.equals("Search") || search.isEmpty() || item.getTranslationKey().contains(search) || item.getName().getString().toLowerCase().contains(search.toLowerCase())) { - allItems.add(new ItemPlate(id1, id1 * 20, item)); + allItems.add(new ItemPlate(id1, id1 * 20, item, item.getTranslationKey())); id1++; } } } - private record ItemPlate(float id, float offset, Item item) { + private record ItemPlate(float id, float offset, Item item, String key) { } } \ No newline at end of file diff --git a/src/main/java/thunder/hack/gui/windows/impl/MacroWindow.java b/src/main/java/thunder/hack/gui/windows/impl/MacroWindow.java index 6ce76104..385442ed 100644 --- a/src/main/java/thunder/hack/gui/windows/impl/MacroWindow.java +++ b/src/main/java/thunder/hack/gui/windows/impl/MacroWindow.java @@ -69,7 +69,6 @@ public void render(DrawContext context, int mouseX, int mouseY) { if (macroPlates.isEmpty()) { FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), isRu() ? "Тут пока пусто" : "It's empty here yet", getX() + getWidth() / 2f, getY() + getHeight() / 2f, new Color(0xBDBDBD).getRGB()); - return; } String blink = (System.currentTimeMillis() / 240) % 2 == 0 ? "" : "l"; @@ -152,7 +151,7 @@ public void render(DrawContext context, int mouseX, int mouseY) { FontRenderers.icons.drawString(context.getMatrices(), "w", getX() + getWidth() - 15, macroPlate.offset + getY() + 40 + getScrollOffset(), -1); FontRenderers.sf_medium_mini.drawString(context.getMatrices(), id + ".", getX() + 3, macroPlate.offset + getY() + 41 + getScrollOffset(), textColor); } - + setMaxElementsHeight(macroPlates.size() * 20); Render2DEngine.popWindow(); } diff --git a/src/main/java/thunder/hack/gui/windows/impl/WaypointWindow.java b/src/main/java/thunder/hack/gui/windows/impl/WaypointWindow.java new file mode 100644 index 00000000..db2a3c6d --- /dev/null +++ b/src/main/java/thunder/hack/gui/windows/impl/WaypointWindow.java @@ -0,0 +1,494 @@ +package thunder.hack.gui.windows.impl; + +import com.google.common.collect.Lists; +import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.util.InputUtil; +import net.minecraft.util.StringHelper; +import org.lwjgl.glfw.GLFW; +import thunder.hack.ThunderHack; +import thunder.hack.core.impl.StringHelperUpdated; +import thunder.hack.core.impl.WayPointManager; +import thunder.hack.gui.clickui.ClickGUI; +import thunder.hack.gui.clickui.impl.SliderElement; +import thunder.hack.gui.font.FontRenderers; +import thunder.hack.gui.windows.WindowBase; +import thunder.hack.modules.client.HudEditor; +import thunder.hack.utility.render.Render2DEngine; + +import java.awt.*; +import java.util.ArrayList; +import java.util.Objects; + +import static thunder.hack.modules.Module.fullNullCheck; +import static thunder.hack.modules.Module.mc; +import static thunder.hack.modules.client.ClientSettings.isRu; + +public class WaypointWindow extends WindowBase { + private static WaypointWindow instance = new WaypointWindow(); + private ArrayList waypointPlates = new ArrayList<>(); + private int listeningId = -1; + private ListeningType listeningType; + + private String search = "Search", addName = "Name", addX = "X", addY = "Y", addZ = "Z", addServer = "2b2t.org", addDimension = "overworld"; + + private enum ListeningType { + Name, X, Y, Z, Server + } + + public WaypointWindow() { + this(mc.getWindow().getScaledWidth() / 2f - 60, mc.getWindow().getScaledHeight() / 2f - 40, 340, 180); + } + + public WaypointWindow(float x, float y, float width, float height) { + super(x, y, width, height, "Waypoints"); + refresh(); + } + + public static WaypointWindow get() { + if (instance == null) + instance = new WaypointWindow(); + instance.refresh(); + return instance; + } + + @Override + public void render(DrawContext context, int mouseX, int mouseY) { + super.render(context, mouseX, mouseY); + + Color color = new Color(0xC5333333, true); + Color color2 = new Color(0xC55B5B5B, true); + Color hoveredColor = new Color(0xC5494949, true); + int textColor = new Color(0xBDBDBD).getRGB(); + + boolean hover1 = Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 90, getY() + 3, 70, 10); + + Render2DEngine.drawRectWithOutline(context.getMatrices(), getX() + getWidth() - 90, getY() + 3, 70, 10, hover1 ? hoveredColor : color, color2); + FontRenderers.sf_medium_mini.drawString(context.getMatrices(), search, getX() + getWidth() - 86, getY() + 7, new Color(0xD5D5D5).getRGB()); + + if (waypointPlates.isEmpty()) { + FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), isRu() ? "Тут пока пусто" : "It's empty here yet", + getX() + getWidth() / 2f, getY() + getHeight() / 2f, new Color(0xBDBDBD).getRGB()); + } + + String blink = (System.currentTimeMillis() / 240) % 2 == 0 ? "" : "l"; + + float nameX = getX() + 11; + float nameWidth = getWidth() / 5.5f; + + float posXX = nameX + nameWidth + 2; + float posXWidth = getWidth() / 8f; + + float posYX = posXX + posXWidth + 2; + float posYWidth = getWidth() / 8f; + + float posZX = posYX + posYWidth + 2; + float posZWidth = getWidth() / 8f; + + float serverX = posZX + posZWidth + 2; + float serverWidth = getWidth() / 6f; + + float dimensionX = serverX + serverWidth + 2; + float dimensionWidth = getWidth() / 7f; + + { + // Name + boolean hover2 = Render2DEngine.isHovered(mouseX, mouseY, nameX, getY() + 19, nameWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), nameX, getY() + 19, nameWidth, 11, hover2 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), addName + (listeningId == -3 && listeningType == ListeningType.Name ? blink : "") + , nameX + 2, getY() + 23, new Color(0xBDBDBD).getRGB()); + + // X + boolean hover3 = Render2DEngine.isHovered(mouseX, mouseY, posXX, getY() + 19, posXWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), posXX, getY() + 19, posXWidth, 11, hover3 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), addX + (listeningId == -3 && listeningType == ListeningType.X ? blink : "") + , posXX + 2, getY() + 23, textColor); + + // Y + boolean hover4 = Render2DEngine.isHovered(mouseX, mouseY, posYX, getY() + 19, posYWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), posYX, getY() + 19, posYWidth, 11, hover4 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), addY + (listeningId == -3 && listeningType == ListeningType.Y ? blink : "") + , posYX + 2, getY() + 23, new Color(0xBDBDBD).getRGB()); + + // Z + boolean hover5 = Render2DEngine.isHovered(mouseX, mouseY, posZX, getY() + 19, posZWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), posZX, getY() + 19, posZWidth, 11, hover5 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), addZ + (listeningId == -3 && listeningType == ListeningType.Z ? blink : "") + , posZX + 2, getY() + 23, new Color(0xBDBDBD).getRGB()); + + // Server + boolean hover6 = Render2DEngine.isHovered(mouseX, mouseY, serverX, getY() + 19, serverWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), serverX, getY() + 19, serverWidth, 11, hover6 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), addServer + (listeningId == -3 && listeningType == ListeningType.Server ? blink : "") + , serverX + 2, getY() + 23, new Color(0xBDBDBD).getRGB()); + + // dimension + boolean hover7 = Render2DEngine.isHovered(mouseX, mouseY, dimensionX, getY() + 19, dimensionWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), dimensionX, getY() + 19, dimensionWidth, 11, hover7 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), addDimension, dimensionX + 2, getY() + 23, new Color(0xBDBDBD).getRGB()); + + // Add + boolean hover8 = Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 15, getY() + 19, 11, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), getX() + getWidth() - 15, getY() + 19, 11, 11, hover8 ? hoveredColor : color, color2); + FontRenderers.categories.drawString(context.getMatrices(), "+", getX() + getWidth() - 12, getY() + 23, -1); + } + + Render2DEngine.horizontalGradient(context.getMatrices(), getX() + 2, getY() + 33f, getX() + 2 + getWidth() / 2f - 2, getY() + 33.5f, Render2DEngine.injectAlpha(HudEditor.textColor.getValue().getColorObject(), 0), HudEditor.textColor.getValue().getColorObject()); + Render2DEngine.horizontalGradient(context.getMatrices(), getX() + 2 + getWidth() / 2f - 2, getY() + 33f, getX() + 2 + getWidth() - 4, getY() + 33.5f, HudEditor.textColor.getValue().getColorObject(), Render2DEngine.injectAlpha(HudEditor.textColor.getValue().getColorObject(), 0)); + + + FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), "Name", nameX + nameWidth / 2f, getY() + 40, textColor); + FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), "X", posXX + posXWidth / 2f, getY() + 40, textColor); + FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), "Y", posYX + posYWidth / 2f, getY() + 40, textColor); + FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), "Z", posZX + posZWidth / 2f, getY() + 40, textColor); + FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), "Server", serverX + serverWidth / 2f, getY() + 40, textColor); + FontRenderers.sf_medium.drawCenteredString(context.getMatrices(), "Dimension", dimensionX + dimensionWidth / 2f, getY() + 40, textColor); + + Render2DEngine.addWindow(context.getMatrices(), getX(), getY() + 50, getX() + getWidth(), getY() + getHeight() - 1, 1f); + + int id = 0; + for (WaypointPlate waypointPlate : waypointPlates) { + id++; + if ((int) (waypointPlate.offset + getY() + 25) + getScrollOffset() > getY() + getHeight() || waypointPlate.offset + getScrollOffset() + getY() + 10 < getY()) + continue; + + boolean hover2 = Render2DEngine.isHovered(mouseX, mouseY, nameX, getY() + 36 + getScrollOffset() + waypointPlate.offset, nameWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), nameX, getY() + 36 + getScrollOffset() + waypointPlate.offset, nameWidth, 11, hover2 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), waypointPlate.waypoint.getName() + (listeningId == waypointPlate.id && listeningType == ListeningType.Name ? blink : "") + , nameX + 2, getY() + 40 + getScrollOffset() + waypointPlate.offset, new Color(0xBDBDBD).getRGB()); + + // X + boolean hover3 = Render2DEngine.isHovered(mouseX, mouseY, posXX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posXWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), posXX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posXWidth, 11, hover3 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), waypointPlate.waypoint.getX() + (listeningId == waypointPlate.id && listeningType == ListeningType.X ? blink : "") + , posXX + 2, getY() + 40 + getScrollOffset() + waypointPlate.offset, textColor); + + // Y + boolean hover4 = Render2DEngine.isHovered(mouseX, mouseY, posYX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posYWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), posYX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posYWidth, 11, hover4 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), waypointPlate.waypoint.getY() + (listeningId == waypointPlate.id && listeningType == ListeningType.Y ? blink : "") + , posYX + 2, getY() + 40 + getScrollOffset() + waypointPlate.offset, new Color(0xBDBDBD).getRGB()); + + // Z + boolean hover5 = Render2DEngine.isHovered(mouseX, mouseY, posZX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posZWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), posZX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posZWidth, 11, hover5 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), waypointPlate.waypoint.getZ() + (listeningId == waypointPlate.id && listeningType == ListeningType.Z ? blink : "") + , posZX + 2, getY() + 40 + getScrollOffset() + waypointPlate.offset, new Color(0xBDBDBD).getRGB()); + + // Server + boolean hover6 = Render2DEngine.isHovered(mouseX, mouseY, serverX, getY() + 36 + getScrollOffset() + waypointPlate.offset, serverWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), serverX, getY() + 36 + getScrollOffset() + waypointPlate.offset, serverWidth, 11, hover6 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), waypointPlate.waypoint.getServer() + (listeningId == waypointPlate.id && listeningType == ListeningType.Server ? blink : "") + , serverX + 2, getY() + 40 + getScrollOffset() + waypointPlate.offset, new Color(0xBDBDBD).getRGB()); + + // dimension + boolean hover7 = Render2DEngine.isHovered(mouseX, mouseY, dimensionX, getY() + 36 + getScrollOffset() + waypointPlate.offset, dimensionWidth, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), dimensionX, getY() + 36 + getScrollOffset() + waypointPlate.offset, dimensionWidth, 11, hover7 ? hoveredColor : color, color2); + FontRenderers.sf_medium.drawString(context.getMatrices(), waypointPlate.waypoint.getDimension(), dimensionX + 2, getY() + 40 + getScrollOffset() + waypointPlate.offset, new Color(0xBDBDBD).getRGB()); + + // Add + boolean hover8 = Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 15, getY() + 36 + getScrollOffset() + waypointPlate.offset, 11, 11); + Render2DEngine.drawRectWithOutline(context.getMatrices(), getX() + getWidth() - 15, getY() + 36 + getScrollOffset() + waypointPlate.offset, 11, 11, hover8 ? hoveredColor : color, color2); + FontRenderers.icons.drawString(context.getMatrices(), "w", getX() + getWidth() - 15, waypointPlate.offset + getY() + 40 + getScrollOffset(), -1); + FontRenderers.sf_medium_mini.drawString(context.getMatrices(), id + ".", getX() + 3, getY() + 41 + getScrollOffset() + waypointPlate.offset, textColor); + } + setMaxElementsHeight(waypointPlates.size() * 20); + Render2DEngine.popWindow(); + } + + @Override + public void mouseClicked(double mouseX, double mouseY, int button) { + super.mouseClicked(mouseX, mouseY, button); + if (Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 90, getY() + 3, 70, 10)) { + listeningId = -2; + search = ""; + } + + if (Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 15, getY() + 3, 10, 10)) + mc.setScreen(ClickGUI.getClickGui()); + + float nameX = getX() + 11; + float nameWidth = getWidth() / 5.5f; + + float posXX = nameX + nameWidth + 2; + float posXWidth = getWidth() / 8f; + + float posYX = posXX + posXWidth + 2; + float posYWidth = getWidth() / 8f; + + float posZX = posYX + posYWidth + 2; + float posZWidth = getWidth() / 8f; + + float serverX = posZX + posZWidth + 2; + float serverWidth = getWidth() / 6f; + + float dimensionX = serverX + serverWidth + 2; + float dimensionWidth = getWidth() / 7f; + + { + boolean hoveringName = Render2DEngine.isHovered(mouseX, mouseY, nameX, getY() + 19, nameWidth, 11); + boolean hoveringX = Render2DEngine.isHovered(mouseX, mouseY, posXX, getY() + 19, posXWidth, 11); + boolean hoveringY = Render2DEngine.isHovered(mouseX, mouseY, posYX, getY() + 19, posYWidth, 11); + boolean hoveringZ = Render2DEngine.isHovered(mouseX, mouseY, posZX, getY() + 19, posZWidth, 11); + boolean hoveringServer = Render2DEngine.isHovered(mouseX, mouseY, serverX, getY() + 19, serverWidth, 11); + boolean hoveringDimension = Render2DEngine.isHovered(mouseX, mouseY, dimensionX, getY() + 19, dimensionWidth, 11); + boolean hoveringAdd = Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 15, getY() + 19, 11, 11); + + if (hoveringName) { + listeningType = ListeningType.Name; + addName = ""; + } + + if (hoveringX) { + listeningType = ListeningType.X; + addX = ""; + } + + if (hoveringY) { + listeningType = ListeningType.Y; + addY = ""; + } + + if (hoveringZ) { + listeningType = ListeningType.Z; + addZ = ""; + } + + if (hoveringServer) { + listeningType = ListeningType.Server; + addServer = ""; + } + + if (hoveringDimension) { + addDimension = switchType(addDimension); + } + + if (hoveringName || hoveringX || hoveringY || hoveringZ || hoveringServer || hoveringDimension) + listeningId = -3; + + if (hoveringAdd) { + try { + ThunderHack.wayPointManager.addWayPoint(new WayPointManager.WayPoint(Integer.parseInt(addX), Integer.parseInt(addY), Integer.parseInt(addZ), addName, addServer, addDimension)); + } catch (Exception e){} + refresh(); + } + } + + ArrayList copy = Lists.newArrayList(waypointPlates); + for (WaypointPlate waypointPlate : copy) { + if ((int) (waypointPlate.offset + getY() + 50) + getScrollOffset() > getY() + getHeight()) + continue; + + boolean hoveringName = Render2DEngine.isHovered(mouseX, mouseY, nameX, getY() + 36 + getScrollOffset() + waypointPlate.offset, nameWidth, 11); + boolean hoveringX = Render2DEngine.isHovered(mouseX, mouseY, posXX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posXWidth, 11); + boolean hoveringY = Render2DEngine.isHovered(mouseX, mouseY, posYX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posYWidth, 11); + boolean hoveringZ = Render2DEngine.isHovered(mouseX, mouseY, posZX, getY() + 36 + getScrollOffset() + waypointPlate.offset, posZWidth, 11); + boolean hoveringServer = Render2DEngine.isHovered(mouseX, mouseY, serverX, getY() + 36 + getScrollOffset() + waypointPlate.offset, serverWidth, 11); + boolean hoveringDimension = Render2DEngine.isHovered(mouseX, mouseY, dimensionX, getY() + 36 + getScrollOffset() + waypointPlate.offset, dimensionWidth, 11); + boolean hoveringRemove = Render2DEngine.isHovered(mouseX, mouseY, getX() + getWidth() - 15, getY() + 36 + getScrollOffset() + waypointPlate.offset, 11, 11); + + if (hoveringName) + listeningType = ListeningType.Name; + + if (hoveringX) + listeningType = ListeningType.X; + + if (hoveringY) + listeningType = ListeningType.Y; + + if (hoveringZ) + listeningType = ListeningType.Z; + + if (hoveringServer) + listeningType = ListeningType.Server; + + if (hoveringDimension) + waypointPlate.waypoint.setDimension(switchType(waypointPlate.waypoint.getDimension())); + + if (hoveringName || hoveringX || hoveringY || hoveringZ || hoveringServer || hoveringDimension) + listeningId = waypointPlate.id; + + if (hoveringRemove) { + ThunderHack.wayPointManager.removeWayPoint(waypointPlate.waypoint); + refresh(); + } + } + } + + @Override + public void keyPressed(int keyCode, int scanCode, int modifiers) { + if (keyCode == GLFW.GLFW_KEY_F && (InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT_CONTROL) || InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_RIGHT_CONTROL))) { + listeningId = -2; + return; + } + + if (listeningId != -1) { + switch (keyCode) { + case GLFW.GLFW_KEY_ENTER -> { + if (listeningId != -2) { + listeningId = -1; + } + } + + case GLFW.GLFW_KEY_ESCAPE -> { + if (listeningId == -2) + search = "Search"; + listeningId = -1; + refresh(); + } + + case GLFW.GLFW_KEY_BACKSPACE -> { + if (listeningId == -2) { + search = SliderElement.removeLastChar(search); + refresh(); + if (Objects.equals(search, "")) { + listeningId = -1; + search = "Search"; + } + return; + } + + for (WaypointPlate plate : waypointPlates) { + if (listeningId == plate.id) { + switch (listeningType) { + case Name -> { + plate.waypoint.setName(SliderElement.removeLastChar(plate.waypoint.getName())); + return; + } + case Server -> { + plate.waypoint.setServer(SliderElement.removeLastChar(plate.waypoint.getServer())); + return; + } + case X -> { + String num = SliderElement.removeLastChar(String.valueOf(plate.waypoint.getX())); + if(num.isEmpty()) + num = "0"; + + plate.waypoint.setX(Integer.parseInt(num)); + return; + } + case Y -> { + String num = SliderElement.removeLastChar(String.valueOf(plate.waypoint.getY())); + if(num.isEmpty()) + num = "0"; + + plate.waypoint.setY(Integer.parseInt(num)); + return; + } + case Z -> { + String num = SliderElement.removeLastChar(String.valueOf(plate.waypoint.getZ())); + if(num.isEmpty()) + num = "0"; + + plate.waypoint.setZ(Integer.parseInt(num)); + return; + } + } + } + } + + if (listeningId == -3) { + switch (listeningType) { + case Name -> { + addName = SliderElement.removeLastChar(addName); + } + case Server -> { + addServer = SliderElement.removeLastChar(addServer); + } + case X -> { + addX = SliderElement.removeLastChar(addX); + } + case Y -> { + addY = SliderElement.removeLastChar(addY); + } + case Z -> { + addZ = SliderElement.removeLastChar(addZ); + } + } + } + } + + case GLFW.GLFW_KEY_SPACE -> { + if (listeningId == -2) + search = search + " "; + } + } + } + } + + @Override + public void charTyped(char key, int keyCode) { + if (StringHelperUpdated.isValidChar(key) && listeningId != -1) { + if (listeningId == -2) + search = search + key; + + for (WaypointPlate plate : waypointPlates) { + if (listeningId == plate.id) { + try { + switch (listeningType) { + case Name -> plate.waypoint.setName(plate.waypoint.getName() + key); + case Server -> plate.waypoint.setServer(plate.waypoint.getServer() + key); + case X -> plate.waypoint.setX(Integer.parseInt(String.valueOf(plate.waypoint.getX()) + key)); + case Y -> plate.waypoint.setY(Integer.parseInt(String.valueOf(plate.waypoint.getY()) + key)); + case Z -> plate.waypoint.setZ(Integer.parseInt(String.valueOf(plate.waypoint.getZ()) + key)); + } + } catch (Exception e) { + e.printStackTrace(); + } + return; + } + } + + if (listeningId == -3) { + try { + switch (listeningType) { + case Name -> addName = addName + key; + case Server -> addServer = addServer + key; + case X -> addX = addX + key; + case Y -> addY = addY + key; + case Z -> addZ = addZ + key; + } + } catch (Exception e) { + e.printStackTrace(); + } + } + refresh(); + } + } + + private void refresh() { + resetScroll(); + waypointPlates.clear(); + int id1 = 0; + for (WayPointManager.WayPoint w : ThunderHack.wayPointManager.getWayPoints()) + if (search.equals("Search") || search.isEmpty() || w.getName().contains(search) || w.getServer().contains(search)) { + waypointPlates.add(new WaypointPlate(id1, id1 * 20 + 18, w)); + id1++; + } + + addServer = mc.isInSingleplayer() || fullNullCheck() ? "SinglePlayer" : mc.getNetworkHandler().getServerInfo().address; + addDimension = fullNullCheck() ? "overworld" : mc.world.getRegistryKey().getValue().getPath(); + } + + private String switchType(String t) { + switch (t) { + case "the_end" -> { + return "overworld"; + } + case "overworld" -> { + return "the_nether"; + } + case "the_nether" -> { + return "the_end"; + } + } + return "overworld"; + } + + @Override + public int getMinWidth() { + return 340; + } + + private record WaypointPlate(int id, float offset, WayPointManager.WayPoint waypoint) { + } +} \ No newline at end of file diff --git a/src/main/java/thunder/hack/modules/client/WayPoints.java b/src/main/java/thunder/hack/modules/client/WayPoints.java index ac69ba7b..83f21d72 100644 --- a/src/main/java/thunder/hack/modules/client/WayPoints.java +++ b/src/main/java/thunder/hack/modules/client/WayPoints.java @@ -13,7 +13,7 @@ import thunder.hack.utility.render.Render3DEngine; public final class WayPoints extends Module { - private static final Identifier ICON = new Identifier("textures/waypoint.png"); + private static final Identifier ICON = new Identifier("thunderhack", "textures/hud/elements/waypoint.png"); public WayPoints() { super("WayPoints", Category.CLIENT); @@ -25,52 +25,48 @@ public void onEnable() { } public void onRender2D(DrawContext context) { - if (!ThunderHack.wayPointManager.getWayPoints().isEmpty()) { + if (!ThunderHack.wayPointManager.getWayPoints().isEmpty() && !fullNullCheck()) { for (WayPointManager.WayPoint wp : ThunderHack.wayPointManager.getWayPoints()) { - if (wp.name() == null) continue; - if (mc.isInSingleplayer()) continue; - if (!mc.getNetworkHandler().getServerInfo().address.contains(wp.server())) continue; - - double difX = wp.x() - mc.player.getPos().x; - double difZ = wp.z() - mc.player.getPos().z; + if (wp.getName() == null) continue; + if ((mc.isInSingleplayer() && wp.getServer().equals("SinglePlayer")) + || (mc.getNetworkHandler().getServerInfo() != null && !mc.getNetworkHandler().getServerInfo().address.contains(wp.getServer()))) continue; + if (!mc.world.getRegistryKey().getValue().getPath().equals(wp.getDimension())) continue; + double difX = wp.getX() - mc.player.getPos().x; + double difZ = wp.getZ() - mc.player.getPos().z; float yaw = (float) MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(difZ, difX)) - 90.0); double plYaw = MathHelper.wrapDegrees(mc.player.getYaw()); if (Math.abs(yaw - plYaw) > 90) continue; - Vec3d vector = new Vec3d(wp.x(), wp.y(), wp.z()); + Vec3d vector = new Vec3d(wp.getX(), wp.getY(), wp.getZ()); Vector4d position = null; vector = Render3DEngine.worldSpaceToScreenSpace(new Vec3d(vector.x, vector.y, vector.z)); - if (vector != null) { - position = new Vector4d(vector.x, vector.y, vector.z, 0); - position.x = Math.min(vector.x, position.x); - position.y = Math.min(vector.y, position.y); - position.z = Math.max(vector.x, position.z); - } + position = new Vector4d(vector.x, vector.y, vector.z, 0); + position.x = Math.min(vector.x, position.x); + position.y = Math.min(vector.y, position.y); + position.z = Math.max(vector.x, position.z); - if (position != null) { - double posX = position.x; - double posY = position.y; - double endPosX = position.z; + double posX = position.x; + double posY = position.y; + double endPosX = position.z; - float diff = (float) (endPosX - posX) / 2; - float tagX = (float) ((posX + diff - FontRenderers.sf_bold_mini.getStringWidth(wp.name()) / 2) * 1); + float diff = (float) (endPosX - posX) / 2; + float tagX = (float) ((posX + diff - FontRenderers.sf_bold_mini.getStringWidth(wp.getName()) / 2) * 1); - String coords = wp.x() + " " + wp.z(); - float tagX2 = (float) ((posX + diff - FontRenderers.sf_bold_mini.getStringWidth(coords) / 2) * 1); + String coords = wp.getX() + " " + wp.getZ(); + float tagX2 = (float) ((posX + diff - FontRenderers.sf_bold_mini.getStringWidth(coords) / 2) * 1); - String distance = String.format("%.0f", Math.sqrt(mc.player.squaredDistanceTo(wp.x(), wp.y(), wp.z()))) + "m"; - float tagX3 = (float) ((posX + diff - FontRenderers.sf_bold_mini.getStringWidth(distance) / 2) * 1); + String distance = String.format("%.0f", Math.sqrt(mc.player.squaredDistanceTo(wp.getX(), wp.getY(), wp.getZ()))) + "m"; + float tagX3 = (float) ((posX + diff - FontRenderers.sf_bold_mini.getStringWidth(distance) / 2) * 1); - context.getMatrices().push(); - context.getMatrices().translate(posX - 10, (posY - 35), 0); - context.drawTexture(ICON, 0, 0, 20, 20, 0, 0, 20, 20, 20, 20); - context.getMatrices().pop(); + context.getMatrices().push(); + context.getMatrices().translate(posX - 10, (posY - 35), 0); + context.drawTexture(ICON, 0, 0, 20, 20, 0, 0, 20, 20, 20, 20); + context.getMatrices().pop(); - FontRenderers.sf_bold_mini.drawString(context.getMatrices(), wp.name(), tagX, (float) posY - 10, -1); - FontRenderers.sf_bold_mini.drawString(context.getMatrices(), Formatting.GRAY + coords, tagX2, (float) posY - 2, -1); - FontRenderers.sf_bold_mini.drawString(context.getMatrices(), Formatting.GRAY + distance, tagX3, (float) posY + 6, -1); - } + FontRenderers.sf_bold_mini.drawString(context.getMatrices(), wp.getName(), tagX, (float) posY - 10, -1); + FontRenderers.sf_bold_mini.drawString(context.getMatrices(), Formatting.GRAY + coords, tagX2, (float) posY - 2, -1); + FontRenderers.sf_bold_mini.drawString(context.getMatrices(), Formatting.GRAY + distance, tagX3, (float) posY + 6, -1); } } } -} +} \ No newline at end of file diff --git a/src/main/java/thunder/hack/modules/client/Windows.java b/src/main/java/thunder/hack/modules/client/Windows.java index 48fcac50..ee1a84d2 100644 --- a/src/main/java/thunder/hack/modules/client/Windows.java +++ b/src/main/java/thunder/hack/modules/client/Windows.java @@ -1,11 +1,10 @@ package thunder.hack.modules.client; - -import thunder.hack.core.impl.ModuleManager; import thunder.hack.gui.windows.WindowsScreen; import thunder.hack.gui.windows.impl.ConfigWindow; import thunder.hack.gui.windows.impl.FriendsWindow; import thunder.hack.gui.windows.impl.MacroWindow; +import thunder.hack.gui.windows.impl.WaypointWindow; import thunder.hack.modules.Module; public class Windows extends Module { @@ -15,11 +14,12 @@ public Windows() { @Override public void onEnable() { - ModuleManager.windows.disable(); mc.setScreen(new WindowsScreen( MacroWindow.get(), ConfigWindow.get(), - FriendsWindow.get() + FriendsWindow.get(), + WaypointWindow.get() )); + disable(); } } \ No newline at end of file diff --git a/src/main/java/thunder/hack/modules/combat/Aura.java b/src/main/java/thunder/hack/modules/combat/Aura.java index 9578ac6a..472d4607 100644 --- a/src/main/java/thunder/hack/modules/combat/Aura.java +++ b/src/main/java/thunder/hack/modules/combat/Aura.java @@ -62,10 +62,13 @@ import static thunder.hack.modules.client.ClientSettings.isRu; import static thunder.hack.utility.math.MathUtility.random; -public final class Aura extends Module { +public class Aura extends Module { public final Setting attackRange = new Setting<>("Range", 3.1f, 1f, 6.0f); public final Setting wallRange = new Setting<>("ThroughWallsRange", 3.1f, 0f, 6.0f); - public final Setting wallsBypass = new Setting<>("WallsBypass", WallsBypass.Off, v -> wallRange.getValue() > 0); + public final Setting elytra = new Setting<>("ElytraOverride",false); + public final Setting elytraAttackRange = new Setting<>("ElytraRange", 3.1f, 1f, 6.0f, v -> elytra.getValue()); + public final Setting elytraWallRange = new Setting<>("ElytraThroughWallsRange", 3.1f, 0f, 6.0f,v -> elytra.getValue()); + public final Setting wallsBypass = new Setting<>("WallsBypass", WallsBypass.Off, v -> getWallRange() > 0); public final Setting fov = new Setting<>("FOV", 180, 1, 180); public final Setting rotationMode = new Setting<>("RotationMode", Mode.Track); public final Setting interactTicks = new Setting<>("InteractTicks", 3, 1, 10, v -> rotationMode.getValue() == Mode.Interact); @@ -153,6 +156,13 @@ public Aura() { super("Aura", Category.COMBAT); } + private float getRange(){ + return elytra.getValue() && mc.player.isFallFlying() ? elytraAttackRange.getValue() : attackRange.getValue(); + } + private float getWallRange(){ + return elytra.getValue() && mc.player.isFallFlying() ? elytraWallRange.getValue() : wallRange.getValue(); + } + public void auraLogic() { if (!haveWeapon()) { target = null; @@ -249,35 +259,29 @@ public void postAttack(boolean block, boolean sprint) { } private void disableSprint() { - assert mc.player != null; mc.player.setSprinting(false); mc.options.sprintKey.setPressed(false); sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.STOP_SPRINTING)); } private void enableSprint() { - assert mc.player != null; mc.player.setSprinting(true); mc.options.sprintKey.setPressed(true); sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.START_SPRINTING)); } public void resolvePlayers() { - if (resolver.getValue() != Resolver.Off) { - assert mc.world != null; + if (resolver.getValue() != Resolver.Off) for (PlayerEntity player : mc.world.getPlayers()) if (player instanceof OtherClientPlayerEntity) ((IOtherClientPlayerEntity) player).resolve(resolver.getValue()); - } } public void restorePlayers() { - if (resolver.getValue() != Resolver.Off) { - + if (resolver.getValue() != Resolver.Off) for (PlayerEntity player : mc.world.getPlayers()) if (player instanceof OtherClientPlayerEntity) ((IOtherClientPlayerEntity) player).releaseResolver(); - } } public void handleKill() { @@ -506,7 +510,7 @@ private void calcRotations(boolean ready) { if (targetVec == null) return; - pitchAcceleration = ThunderHack.playerManager.checkRtx(rotationYaw, rotationPitch, attackRange.getValue() + aimRange.getValue(), attackRange.getValue() + aimRange.getValue(), rayTrace.getValue()) + pitchAcceleration = ThunderHack.playerManager.checkRtx(rotationYaw, rotationPitch, getRange() + aimRange.getValue(), getRange() + aimRange.getValue(), rayTrace.getValue()) ? aimedPitchStep.getValue() : pitchAcceleration < maxPitchStep.getValue() ? pitchAcceleration * pitchAccelerate.getValue() : maxPitchStep.getValue(); float delta_yaw = wrapDegrees((float) wrapDegrees(Math.toDegrees(Math.atan2(targetVec.z - mc.player.getZ(), (targetVec.x - mc.player.getX()))) - 90) - rotationYaw) + (wallsBypass.is(WallsBypass.V2) && !ready && !mc.player.canSee(target) ? 20 : 0); @@ -553,7 +557,7 @@ private void calcRotations(boolean ready) { if (!rotationMode.is(Mode.Grim)) ModuleManager.rotations.fixRotation = rotationYaw; - lookingAtHitbox = ThunderHack.playerManager.checkRtx(rotationYaw, rotationPitch, attackRange.getValue(), wallRange.getValue(), rayTrace.getValue()); + lookingAtHitbox = ThunderHack.playerManager.checkRtx(rotationYaw, rotationPitch, getRange(), getWallRange(), rayTrace.getValue()); } public void onRender3D(MatrixStack stack) { @@ -581,12 +585,12 @@ public void onDisable() { } private float getSquaredRotateDistance() { - float dst = attackRange.getValue(); + float dst = getRange(); dst += aimRange.getValue(); if ((mc.player.isFallFlying() || ModuleManager.elytraPlus.isEnabled()) && target != null) dst += 4f; if (ModuleManager.strafe.isEnabled()) dst += 4f; if (rotationMode.getValue() != Mode.Track || rayTrace.getValue() == RayTrace.OFF) - dst = attackRange.getValue(); + dst = getRange(); return dst * dst; } @@ -655,12 +659,12 @@ public Vec3d getLegitLook(Entity target) { float[] rotation; // Если мы перестали смотреть на цель - if (!ThunderHack.playerManager.checkRtx(rotationYaw, rotationPitch, attackRange.getValue(), wallRange.getValue(), rayTrace.getValue())) { + if (!ThunderHack.playerManager.checkRtx(rotationYaw, rotationPitch, getRange(), getWallRange(), rayTrace.getValue())) { float[] rotation1 = PlayerManager.calcAngle(target.getPos().add(0, target.getEyeHeight(target.getPose()) / 2f, 0)); // Проверяем видимость центра игрока if (PlayerUtility.squaredDistanceFromEyes(target.getPos().add(0, target.getEyeHeight(target.getPose()) / 2f, 0)) <= attackRange.getPow2Value() - && ThunderHack.playerManager.checkRtx(rotation1[0], rotation1[1], attackRange.getValue(), 0, rayTrace.getValue())) { + && ThunderHack.playerManager.checkRtx(rotation1[0], rotation1[1], getRange(), 0, rayTrace.getValue())) { // наводим на центр rotationPoint = new Vec3d(random(-0.1f, 0.1f), target.getEyeHeight(target.getPose()) / (random(1.8f, 2.5f)), random(-0.1f, 0.1f)); } else { @@ -677,7 +681,7 @@ public Vec3d getLegitLook(Entity target) { if (PlayerUtility.squaredDistanceFromEyes(v1) > attackRange.getPow2Value()) continue; rotation = PlayerManager.calcAngle(v1); - if (ThunderHack.playerManager.checkRtx(rotation[0], rotation[1], attackRange.getValue(), 0, rayTrace.getValue())) { + if (ThunderHack.playerManager.checkRtx(rotation[0], rotation[1], getRange(), 0, rayTrace.getValue())) { // Наводимся, если видим эту точку rotationPoint = new Vec3d(x1, y1, z1); break; @@ -707,7 +711,7 @@ public boolean isInRange(Entity target) { continue; rotation = PlayerManager.calcAngle(new Vec3d(target.getX() + x1, target.getY() + y1, target.getZ() + z1)); - if (ThunderHack.playerManager.checkRtx(rotation[0], rotation[1], (float) Math.sqrt(getSquaredRotateDistance()), wallRange.getValue(), rayTrace.getValue())) { + if (ThunderHack.playerManager.checkRtx(rotation[0], rotation[1], (float) Math.sqrt(getSquaredRotateDistance()), getWallRange(), rayTrace.getValue())) { return true; } } diff --git a/src/main/java/thunder/hack/modules/misc/Spammer.java b/src/main/java/thunder/hack/modules/misc/Spammer.java index 78f17020..12f4d745 100644 --- a/src/main/java/thunder/hack/modules/misc/Spammer.java +++ b/src/main/java/thunder/hack/modules/misc/Spammer.java @@ -35,7 +35,7 @@ public Spammer() { public static void loadSpammer() { try { - File file = new File(ConfigManager.MAIN_FOLDER + "misc/spammer.txt"); + File file = new File(ConfigManager.MISC_FOLDER + "spammer.txt"); if (!file.exists()) file.createNewFile(); new Thread(() -> { diff --git a/src/main/java/thunder/hack/modules/misc/UnHook.java b/src/main/java/thunder/hack/modules/misc/UnHook.java index 1e2315a4..bc42f68a 100644 --- a/src/main/java/thunder/hack/modules/misc/UnHook.java +++ b/src/main/java/thunder/hack/modules/misc/UnHook.java @@ -1,17 +1,11 @@ package thunder.hack.modules.misc; import net.minecraft.SharedConstants; -import net.minecraft.block.Block; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.util.Icons; -import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket; import net.minecraft.util.Formatting; import thunder.hack.ThunderHack; -import thunder.hack.core.impl.CommandManager; -import thunder.hack.core.impl.ConfigManager; import thunder.hack.modules.Module; import thunder.hack.modules.client.ClientSettings; -import thunder.hack.modules.render.Search; import thunder.hack.utility.math.MathUtility; import java.io.*; diff --git a/src/main/java/thunder/hack/modules/render/BlockESP.java b/src/main/java/thunder/hack/modules/render/BlockESP.java new file mode 100644 index 00000000..a0f45704 --- /dev/null +++ b/src/main/java/thunder/hack/modules/render/BlockESP.java @@ -0,0 +1,156 @@ +package thunder.hack.modules.render; + +import com.google.common.collect.Lists; +import net.minecraft.block.*; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.util.Util; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Box; +import net.minecraft.util.math.Vec3d; +import org.jetbrains.annotations.NotNull; +import thunder.hack.modules.Module; +import thunder.hack.setting.Setting; +import thunder.hack.setting.impl.ColorSetting; +import thunder.hack.setting.impl.ItemSelectSetting; +import thunder.hack.utility.Timer; +import thunder.hack.utility.player.PlayerUtility; +import thunder.hack.utility.render.Render3DEngine; + +import java.util.ArrayList; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import static thunder.hack.modules.client.ClientSettings.isRu; + +public class BlockESP extends Module { + + + public final Setting selectedBlocks = new Setting<>("SelectedBlocks", new ItemSelectSetting(new ArrayList<>())); + public static ArrayList blocks = new ArrayList<>(); + private final Setting range = new Setting<>("Range", 100, 1, 128); + private final Setting limit = new Setting<>("Limit", 50, 1, 2048); + private final Setting color = new Setting<>("Color", new ColorSetting(0xFF00FFFF)); + private final Setting illegals = new Setting<>("Illegals", true); + private final Setting tracers = new Setting<>("Tracers", false); + private final Setting fill = new Setting<>("Fill", true); + private final Setting outline = new Setting<>("Outline", true); + + + private final ExecutorService searchThread = Executors.newSingleThreadExecutor(); + private final Timer searchTimer = new Timer(); + private long lastFrameTime; + private boolean canContinue; + + + public BlockESP() { + super("BlockESP", Category.RENDER); + } + + @Override + public void onEnable() { + blocks.clear(); + lastFrameTime = System.currentTimeMillis(); + canContinue = true; + } + + @Override + public void onUpdate() { + if (searchTimer.every(1000) && canContinue) { + CompletableFuture.supplyAsync(this::scan, searchThread).thenAcceptAsync(this::sync, Util.getMainWorkerExecutor()); + canContinue = false; + } + } + + private ArrayList scan() { + ArrayList bloks = new ArrayList<>(); + for (int x = (int) Math.floor(mc.player.getX() - range.getValue()); x <= Math.ceil(mc.player.getX() + range.getValue()); x++) + for (int y = mc.world.getBottomY() + 1; y <= mc.world.getTopY(); y++) + for (int z = (int) Math.floor(mc.player.getZ() - range.getValue()); z <= Math.ceil(mc.player.getZ() + range.getValue()); z++) { + BlockPos pos = new BlockPos(x, y, z); + BlockState bs = mc.world.getBlockState(pos); + if (shouldAdd(bs.getBlock(), pos)) { + bloks.add(new BlockVec(pos.getX(), pos.getY(), pos.getZ())); + } + } + return bloks; + } + + private void sync(ArrayList b) { + blocks = b; + canContinue = true; + } + + public void onRender3D(MatrixStack stack) { + if (fullNullCheck() || blocks.isEmpty()) return; + int count = 0; + + if (mc.getCurrentFps() < 8 && mc.player.age > 100) { + disable(isRu() ? "Спасаем твой ПК :)" : "Saving ur pc :)"); + return; + } + + if (fill.getValue() || outline.getValue()) { + for (BlockVec vec : Lists.newArrayList(blocks)) { + if(count > limit.getValue()) + continue; + + if (vec.getDistance(mc.player.getPos()) > range.getPow2Value()) { + blocks.remove(vec); + continue; + } + + Box b = new Box(vec.x, vec.y, vec.z, vec.x + 1, vec.y + 1, vec.z + 1); + + if (fill.getValue()) + Render3DEngine.FILLED_QUEUE.add(new Render3DEngine.FillAction(b, color.getValue().getColorObject())); + + if (outline.getValue()) + Render3DEngine.OUTLINE_QUEUE.add(new Render3DEngine.OutlineAction(b, color.getValue().getColorObject(), 2f)); + + if (tracers.getValue()) { + Vec3d vec2 = new Vec3d(0, 0, 75) + .rotateX(-(float) Math.toRadians(mc.gameRenderer.getCamera().getPitch())) + .rotateY(-(float) Math.toRadians(mc.gameRenderer.getCamera().getYaw())) + .add(mc.cameraEntity.getEyePos()); + + Render3DEngine.drawLineDebug(vec2, vec.getVector(), color.getValue().getColorObject()); + } + count++; + } + } + lastFrameTime = System.currentTimeMillis(); + } + + private boolean shouldAdd(Block block, BlockPos pos) { + if(block instanceof AirBlock) return false; + if (selectedBlocks.getValue().contains(block)) return true; + if (illegals.getValue()) return isIllegal(block, pos); + return false; + } + + private boolean isIllegal(Block block, BlockPos pos) { + if (block instanceof CommandBlock || block instanceof BarrierBlock) return true; + + if (block == Blocks.BEDROCK) { + if (!PlayerUtility.isInHell()) + return pos.getY() > 4; + else + return pos.getY() > 127 || (pos.getY() < 123 && pos.getY() > 4); + } + return false; + } + + public record BlockVec(double x, double y, double z) { + public double getDistance(@NotNull Vec3d v) { + double dx = x - v.x; + double dy = y - v.y; + double dz = z - v.z; + return dx * dx + dy * dy + dz * dz; + } + + public Vec3d getVector() { + return new Vec3d(x + 0.5f, y + 0.5f, z + 0.5f); + } + } +} \ No newline at end of file diff --git a/src/main/java/thunder/hack/modules/render/Search.java b/src/main/java/thunder/hack/modules/render/Search.java deleted file mode 100644 index 72da6093..00000000 --- a/src/main/java/thunder/hack/modules/render/Search.java +++ /dev/null @@ -1,180 +0,0 @@ -package thunder.hack.modules.render; - -import net.minecraft.block.BarrierBlock; -import net.minecraft.block.Block; -import net.minecraft.block.Blocks; -import net.minecraft.block.CommandBlock; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Box; -import net.minecraft.util.math.Vec3d; -import org.jetbrains.annotations.NotNull; -import thunder.hack.modules.Module; -import thunder.hack.setting.Setting; -import thunder.hack.setting.impl.ColorSetting; -import thunder.hack.utility.math.FrameRateCounter; -import thunder.hack.utility.render.Render3DEngine; - -import java.util.ArrayList; -import java.util.Objects; -import java.util.concurrent.CopyOnWriteArrayList; - -import static thunder.hack.modules.client.ClientSettings.isRu; - -public class Search extends Module { - - public static CopyOnWriteArrayList blocks = new CopyOnWriteArrayList<>(); - public static ArrayList defaultBlocks = new ArrayList<>(); - private final Setting range = new Setting<>("Range", 100, 1, 128); - private final Setting color = new Setting<>("Color", new ColorSetting(0xFF00FFFF)); - private final Setting illegals = new Setting<>("Illegals", true); - private final Setting tracers = new Setting<>("Tracers", false); - private final Setting fill = new Setting<>("Fill", true); - private final Setting outline = new Setting<>("Outline", true); - - private SearchThread searchThread = new SearchThread(); - - public Search() { - super("Search", Category.RENDER); - } - - @Override - public void onEnable() { - blocks.clear(); - searchThread = new SearchThread(); - searchThread.setName("ThunderHack-SearchThread"); - searchThread.setDaemon(true); - searchThread.start(); - } - - @Override - public void onDisable() { - searchThread.interrupt(); - } - - @Override - public void onUpdate() { - if (!searchThread.isAlive()) { - searchThread = new SearchThread(); - searchThread.setName("ThunderHack-SearchThread"); - searchThread.setDaemon(true); - searchThread.start(); - } - } - - public void onRender3D(MatrixStack stack) { - if (fullNullCheck() || blocks.isEmpty()) return; - if (FrameRateCounter.INSTANCE.getFps() < 10 && mc.player.age > 100) - disable(isRu() ? "Спасаем твой ПК :)" : "Saving ur pc :)"); - - if (fill.getValue() || outline.getValue()) { - for (BlockVec vec : blocks) { - if (vec.getDistance(new BlockVec(mc.player.getX(), mc.player.getY(), mc.player.getZ())) > range.getValue() || !shouldRender(vec)) { - blocks.remove(vec); - continue; - } - - BlockPos pos = new BlockPos((int) vec.x, (int) vec.y, (int) vec.z); - - if (fill.getValue()) - Render3DEngine.FILLED_QUEUE.add(new Render3DEngine.FillAction(new Box(pos), color.getValue().getColorObject())); - - if (outline.getValue()) - Render3DEngine.OUTLINE_QUEUE.add(new Render3DEngine.OutlineAction(new Box(pos), color.getValue().getColorObject(), 2f)); - } - } - - if (tracers.getValue()) { - for (BlockVec vec : blocks) { - if (vec.getDistance(new BlockVec(mc.player.getX(), mc.player.getY(), mc.player.getZ())) > range.getValue() || !shouldRender(vec)) { - blocks.remove(vec); - continue; - } - - Vec3d vec2 = new Vec3d(0, 0, 75) - .rotateX(-(float) Math.toRadians(mc.gameRenderer.getCamera().getPitch())) - .rotateY(-(float) Math.toRadians(mc.gameRenderer.getCamera().getYaw())) - .add(mc.cameraEntity.getEyePos()); - - Render3DEngine.drawLineDebug(vec2, vec.getVector(), color.getValue().getColorObject()); - } - } - } - - private boolean shouldAdd(Block block, BlockPos pos) { - if (defaultBlocks.contains(block)) return true; - if (illegals.getValue()) return isIllegal(block, pos); - return false; - } - - private boolean shouldRender(@NotNull BlockVec vec) { - if (defaultBlocks.contains(mc.world.getBlockState(new BlockPos((int) vec.x, (int) vec.y, (int) vec.z)).getBlock())) { - return true; - } - - if (illegals.getValue()) - return isIllegal(mc.world.getBlockState(new BlockPos((int) vec.x, (int) vec.y, (int) vec.z)).getBlock(), new BlockPos((int) vec.x, (int) vec.y, (int) vec.z)); - - return false; - } - - private boolean isIllegal(Block block, BlockPos pos) { - if (block instanceof CommandBlock || block instanceof BarrierBlock) return true; - - if (block == Blocks.BEDROCK) { - if (!isHell()) { - return pos.getY() > 4; - } else { - return pos.getY() > 127 || (pos.getY() < 123 && pos.getY() > 4); - } - } - return false; - } - - public boolean isHell() { - if (mc.world == null) return false; - return Objects.equals(mc.world.getRegistryKey().getValue().getPath(), "the_nether"); - } - - private record BlockVec(double x, double y, double z) { - public double getDistance(@NotNull BlockVec v) { - double dx = x - v.x; - double dy = y - v.y; - double dz = z - v.z; - - return Math.sqrt(dx * dx + dy * dy + dz * dz); - } - - public Vec3d getVector() { - return new Vec3d(x + 0.5f, y + 0.5f, z + 0.5f); - } - } - - public class SearchThread extends Thread { - @Override - public void run() { - while (!Thread.currentThread().isInterrupted()) { - try { - if (!Module.fullNullCheck()) { - ArrayList bloks = new ArrayList<>(); - for (int x = (int) Math.floor(mc.player.getX() - range.getValue()); x <= Math.ceil(mc.player.getX() + range.getValue()); x++) { - for (int y = mc.world.getBottomY() + 1; y <= mc.world.getTopY(); y++) { - for (int z = (int) Math.floor(mc.player.getZ() - range.getValue()); z <= Math.ceil(mc.player.getZ() + range.getValue()); z++) { - BlockPos pos = new BlockPos(x, y, z); - if (mc.world.isAir(pos)) continue; - if (shouldAdd(mc.world.getBlockState(pos).getBlock(), pos)) { - bloks.add(new BlockVec(pos.getX(), pos.getY(), pos.getZ())); - } - } - } - } - - blocks.clear(); - blocks.addAll(bloks); - } else Thread.yield(); - } catch (Exception ignored) { - } - } - } - } -} \ No newline at end of file diff --git a/src/main/java/thunder/hack/utility/player/PlayerUtility.java b/src/main/java/thunder/hack/utility/player/PlayerUtility.java index 3612a89d..2a0b4735 100644 --- a/src/main/java/thunder/hack/utility/player/PlayerUtility.java +++ b/src/main/java/thunder/hack/utility/player/PlayerUtility.java @@ -1,19 +1,34 @@ package thunder.hack.utility.player; import net.minecraft.client.network.ClientPlayerEntity; -import net.minecraft.client.network.PendingUpdateManager; -import net.minecraft.client.world.ClientWorld; import net.minecraft.item.ItemStack; import net.minecraft.util.hit.HitResult; -import net.minecraft.util.math.*; +import net.minecraft.util.math.Vec2f; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.RaycastContext; import org.jetbrains.annotations.NotNull; -import thunder.hack.injection.accesors.IClientWorldMixin; -import thunder.hack.utility.math.MathUtility; + +import java.util.Objects; import static thunder.hack.modules.Module.mc; public final class PlayerUtility { + + public static boolean isInHell() { + if (mc.world == null) return false; + return Objects.equals(mc.world.getRegistryKey().getValue().getPath(), "the_nether"); + } + + public static boolean isInEnd() { + if (mc.world == null) return false; + return Objects.equals(mc.world.getRegistryKey().getValue().getPath(), "the_end"); + } + + public static boolean isInOver() { + if (mc.world == null) return false; + return Objects.equals(mc.world.getRegistryKey().getValue().getPath(), "overworld"); + } + public static boolean isEating() { if (mc.player == null) return false; @@ -36,6 +51,14 @@ public static float squaredDistanceFromEyes(@NotNull Vec3d vec) { return (float) (d0 * d0 + d1 * d1 + d2 * d2); } + public static float squaredDistance2d(@NotNull Vec2f point) { + if (mc.player == null) return 0f; + + double d = mc.player.getX() - point.x; + double f = mc.player.getZ() - point.y; + return (float) (d * d + f * f); + } + public static ClientPlayerEntity getPlayer() { return mc.player; } @@ -60,11 +83,13 @@ public static float squaredDistance2d(double x, double z) { double f = mc.player.getZ() - z; return (float) (d * d + f * f); } + public static float getSquaredDistance2D(Vec3d vec) { double d0 = mc.player.getX() - vec.getX(); double d2 = mc.player.getZ() - vec.getZ(); return (float) (d0 * d0 + d2 * d2); } + public static boolean canSee(Vec3d pos) { Vec3d vec3d = new Vec3d(mc.player.getX(), mc.player.getEyeY(), mc.player.getZ()); if (pos.distanceTo(vec3d) > 128.0) @@ -72,4 +97,4 @@ public static boolean canSee(Vec3d pos) { else return mc.world.raycast(new RaycastContext(vec3d, pos, RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player)).getType() == HitResult.Type.MISS; } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/thunderhack/lang/en_us.json b/src/main/resources/assets/thunderhack/lang/en_us.json index e3ceea02..ca676c2c 100644 --- a/src/main/resources/assets/thunderhack/lang/en_us.json +++ b/src/main/resources/assets/thunderhack/lang/en_us.json @@ -96,7 +96,7 @@ "descriptions.render.nocameraclip": "Removes the third-person camera clip.", "descriptions.render.norender": "Removes unwanted laggy things.", "descriptions.render.popchams": "Highlights player's totem pops.", - "descriptions.render.search": "Highlights selected blocks.", + "descriptions.render.blockesp": "Highlights selected blocks.", "descriptions.render.shaders": "Shader esp.", "descriptions.render.soundesp": "Highlights sounds.", "descriptions.render.storageesp": "Highlights selected storages.", @@ -220,7 +220,7 @@ "descriptions.commands.prefix": "Change prefix of client.", "descriptions.commands.resetbinds": "Reset keybinds.", "descriptions.commands.rpc": "Set custom picture/gif to DiscordRPC (Only tenor or imgur!!!).", - "descriptions.commands.search": "Add blocks to search.", + "descriptions.commands.blockesp": "Add blocks to BlockESP.", "descriptions.commands.staff": "Add players to staff (players in vanish).", "descriptions.commands.tracker": "Add players to Tracker module.", "descriptions.commands.vclip": "Clip vertically.", diff --git a/src/main/resources/assets/thunderhack/lang/ru_ru.json b/src/main/resources/assets/thunderhack/lang/ru_ru.json index 9554524a..964d7361 100644 --- a/src/main/resources/assets/thunderhack/lang/ru_ru.json +++ b/src/main/resources/assets/thunderhack/lang/ru_ru.json @@ -97,7 +97,7 @@ "descriptions.render.nocameraclip": "Удаляет клип камеры от третьего лица.", "descriptions.render.norender": "Удаляет нежелательные лаганные вещи.", "descriptions.render.popchams": "Подсвечивает тотемпопы игрока.", - "descriptions.render.search": "Подсвечивает выбранные блоки.", + "descriptions.render.blockesp": "Подсвечивает выбранные блоки.", "descriptions.render.soundesp": "Подсвечивает звуки.", "descriptions.render.shaders": "Шейдеры на игроков и предметы.", "descriptions.render.storageesp": "Подсвечивает выбранные хранилища.", @@ -220,7 +220,7 @@ "descriptions.commands.prefix": "Изменить префикс клиента.", "descriptions.commands.resetbinds": "Удалить бинды из модулей.", "descriptions.commands.rpc": "Установить свое изображение/гифку в DiscordRPC (только tenor или imgur!!!).", - "descriptions.commands.search": "Добавить блоки в Search.", + "descriptions.commands.blockesp": "Добавить блоки в BlockESP.", "descriptions.commands.staff": "Добавить игроков в staffBoard (игроки будут видны если они в ванише).", "descriptions.commands.tracker": "Добавить игроков в Tracker.", "descriptions.commands.vclip": "Клипнуться вертикально.",