From 51568cff79838fc7c6a367adb15485a7ee0a3a77 Mon Sep 17 00:00:00 2001 From: DogDog-sys Date: Sat, 29 Nov 2025 18:44:37 +0000 Subject: [PATCH 1/3] quick fix --- .../java/com/nnpg/glazed/GlazedAddon.java | 33 +-- .../com/nnpg/glazed/modules/esp/LlamaESP.java | 280 ++++++++++++++++++ 2 files changed, 293 insertions(+), 20 deletions(-) create mode 100644 src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java diff --git a/src/main/java/com/nnpg/glazed/GlazedAddon.java b/src/main/java/com/nnpg/glazed/GlazedAddon.java index 5a8a23d2..067f9e94 100644 --- a/src/main/java/com/nnpg/glazed/GlazedAddon.java +++ b/src/main/java/com/nnpg/glazed/GlazedAddon.java @@ -10,10 +10,8 @@ import meteordevelopment.meteorclient.events.game.GameJoinedEvent; import meteordevelopment.meteorclient.events.game.GameLeftEvent; -import meteordevelopment.meteorclient.MeteorClient; import net.minecraft.item.Items; import net.minecraft.item.ItemStack; -import meteordevelopment.meteorclient.systems.modules.Category; @@ -34,18 +32,18 @@ public void onInitialize() { - Modules.get().add(new SpawnerProtect()); //done - Modules.get().add(new AntiTrap()); //done - Modules.get().add(new CoordSnapper()); //done - Modules.get().add(new ElytraSwap()); //done - Modules.get().add(new PlayerDetection()); //done - Modules.get().add(new AHSniper()); //done - Modules.get().add(new RTPer()); //done - Modules.get().add(new ShulkerDropper()); //done - Modules.get().add(new AutoSell()); //done - Modules.get().add(new SpawnerDropper()); //done - Modules.get().add(new AutoShulkerOrder()); // done - Modules.get().add(new AutoOrder()); //done + Modules.get().add(new SpawnerProtect()); + Modules.get().add(new AntiTrap()); + Modules.get().add(new CoordSnapper()); + Modules.get().add(new ElytraSwap()); + Modules.get().add(new PlayerDetection()); + Modules.get().add(new AHSniper()); + Modules.get().add(new RTPer()); + Modules.get().add(new ShulkerDropper()); + Modules.get().add(new AutoSell()); + Modules.get().add(new SpawnerDropper()); + Modules.get().add(new AutoShulkerOrder()); + Modules.get().add(new AutoOrder()); Modules.get().add(new HideScoreboard()); Modules.get().add(new LegitCrystalMacro()); Modules.get().add(new AHSell()); @@ -61,12 +59,11 @@ public void onInitialize() { Modules.get().add(new TpaMacro()); Modules.get().add(new TabDetector()); Modules.get().add(new OrderSniper()); - Modules.get().add(new LamaESP()); + Modules.get().add(new LlamaESP()); Modules.get().add(new PillagerESP()); Modules.get().add(new HoleTunnelStairsESP()); Modules.get().add(new CoveredHole()); Modules.get().add(new ClusterFinder()); - Modules.get().add(new AutoShulkerShellOrder()); Modules.get().add(new EmergencySeller()); Modules.get().add(new RTPEndBaseFinder()); Modules.get().add(new ShopBuyer()); @@ -79,10 +76,6 @@ public void onInitialize() { Modules.get().add(new LegitAnchorMacro()); Modules.get().add(new SpawnerOrder()); Modules.get().add(new RegionMap()); - Modules.get().add(new SpawnerOrder()); - Modules.get().add(new RegionMap()); - Modules.get().add(new SpawnerOrder()); - Modules.get().add(new RegionMap()); Modules.get().add(new AutoShulkerShellOrder()); Modules.get().add(new NoBlockInteract()); Modules.get().add(new BeehiveESP()); diff --git a/src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java b/src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java new file mode 100644 index 00000000..07841b51 --- /dev/null +++ b/src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java @@ -0,0 +1,280 @@ +package com.nnpg.glazed.modules.esp; + +import com.nnpg.glazed.GlazedAddon; +import com.nnpg.glazed.VersionUtil; +import meteordevelopment.meteorclient.events.render.Render3DEvent; +import meteordevelopment.meteorclient.settings.*; +import meteordevelopment.meteorclient.systems.modules.Module; +import meteordevelopment.meteorclient.utils.render.MeteorToast; +import meteordevelopment.meteorclient.utils.render.RenderUtils; +import meteordevelopment.meteorclient.utils.render.color.Color; +import meteordevelopment.meteorclient.utils.render.color.SettingColor; +import meteordevelopment.orbit.EventHandler; +import net.minecraft.entity.passive.LlamaEntity; +import net.minecraft.item.Items; +import net.minecraft.text.Text; + +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.CompletableFuture; + +public class LlamaESP extends Module { + private final SettingGroup sgGeneral = settings.getDefaultGroup(); + private final SettingGroup sgRender = settings.createGroup("Render"); + private final SettingGroup sgwebhook = settings.createGroup("Webhook"); + + + // Render settings + private final Setting showTracers = sgRender.add(new BoolSetting.Builder() + .name("Show Tracers") + .description("Draw tracer lines to llamas") + .defaultValue(true) + .build() + ); + + private final Setting tracerColor = sgRender.add(new ColorSetting.Builder() + .name("Tracer Color") + .description("Color of the tracer lines") + .defaultValue(new SettingColor(255, 165, 0, 127)) // Orange color for llamas + .visible(showTracers::get) + .build() + ); + + private final Setting enableWebhook = sgwebhook.add(new BoolSetting.Builder() + .name("Webhook") + .description("Send webhook notifications when llamas are detected") + .defaultValue(false) + .build() + ); + + private final Setting webhookUrl = sgwebhook.add(new StringSetting.Builder() + .name("Webhook URL") + .description("Discord webhook URL") + .defaultValue("") + .visible(enableWebhook::get) + .build() + ); + + private final Setting selfPing = sgwebhook.add(new BoolSetting.Builder() + .name("Self Ping") + .description("Ping yourself in the webhook message") + .defaultValue(false) + .visible(enableWebhook::get) + .build() + ); + + private final Setting discordId = sgwebhook.add(new StringSetting.Builder() + .name("Discord ID") + .description("Your Discord user ID for pinging") + .defaultValue("") + .visible(() -> enableWebhook.get() && selfPing.get()) + .build() + ); + + private final Setting enableDisconnect = sgGeneral.add(new BoolSetting.Builder() + .name("Disconnect") + .description("Automatically disconnect when llamas are detected") + .defaultValue(false) + .build() + ); + + private final Setting notificationMode = sgGeneral.add(new EnumSetting.Builder() + .name("notification-mode") + .description("How to notify when llamas are detected") + .defaultValue(Mode.Both) + .build() + ); + + private final Setting toggleOnFind = sgGeneral.add(new BoolSetting.Builder() + .name("Toggle when found") + .description("Automatically toggles the module when a llama is detected") + .defaultValue(false) + .build() + ); + + private final Set detectedLlamas = new HashSet<>(); + private final HttpClient httpClient = HttpClient.newBuilder() + .connectTimeout(Duration.ofSeconds(10)) + .build(); + + public LamaESP() { + super(GlazedAddon.esp, "LamaESP", "Detects llamas in the world"); + } + + @EventHandler + private void onRender3D(Render3DEvent event) { + if (mc.player == null || mc.world == null) return; + + Set currentLlamas = new HashSet<>(); + + // Find all llamas in the world + for (net.minecraft.entity.Entity entity : mc.world.getEntities()) { + if (entity instanceof LlamaEntity) { + LlamaEntity llama = (LlamaEntity) entity; + currentLlamas.add(entity.getId()); + + // Draw tracers if enabled + if (showTracers.get()) { + double x = VersionUtil.getPrevX(entity) + (entity.getX() - VersionUtil.getPrevX(entity)) * event.tickDelta; + double y = VersionUtil.getPrevY(entity) + (entity.getY() - VersionUtil.getPrevY(entity)) * event.tickDelta; + double z = VersionUtil.getPrevZ(entity) + (entity.getZ() - VersionUtil.getPrevZ(entity)) * event.tickDelta; + + // Target the center/body of the llama + double height = llama.getBoundingBox().maxY - llama.getBoundingBox().minY; + y += height / 2; + + Color color = new Color(tracerColor.get()); + event.renderer.line(RenderUtils.center.x, RenderUtils.center.y, RenderUtils.center.z, x, y, z, color); + } + } + } + + // Check if we found new llamas + if (!currentLlamas.isEmpty() && !currentLlamas.equals(detectedLlamas)) { + Set newLlamas = new HashSet<>(currentLlamas); + newLlamas.removeAll(detectedLlamas); + + if (!newLlamas.isEmpty()) { + detectedLlamas.addAll(newLlamas); + handleLlamaDetection(newLlamas.size()); + } + } else if (currentLlamas.isEmpty()) { + detectedLlamas.clear(); + } + } + + private void handleLlamaDetection(int llamaCount) { + String message = llamaCount == 1 ? + "Llama detected!" : + String.format("%d llamas detected!", llamaCount); + + switch (notificationMode.get()) { + case Chat -> info("(highlight)%s", message); + case Toast -> mc.getToastManager().add(new MeteorToast(Items.LEAD, title, message)); + case Both -> { + info("(highlight)%s", message); + mc.getToastManager().add(new MeteorToast(Items.LEAD, title, message)); + } + } + + if (enableWebhook.get()) { + sendWebhookNotification(llamaCount); + } + + if (toggleOnFind.get()) { + toggle(); + } + + if (enableDisconnect.get()) { + disconnectFromServer(message); + } + } + + private void sendWebhookNotification(int llamaCount) { + String url = webhookUrl.get().trim(); + if (url.isEmpty()) { + warning("Webhook URL not configured!"); + return; + } + + CompletableFuture.runAsync(() -> { + try { + String serverInfo = mc.getCurrentServerEntry() != null ? + mc.getCurrentServerEntry().address : "Unknown Server"; + + String messageContent = ""; + if (selfPing.get() && !discordId.get().trim().isEmpty()) { + messageContent = String.format("<@%s>", discordId.get().trim()); + } + + String llamaText = llamaCount == 1 ? "llama" : "llamas"; + String description = String.format("%d %s detected!", llamaCount, llamaText); + + // Get current coordinates + String coordinates = "Unknown"; + if (mc.player != null) { + coordinates = String.format("X: %.0f, Y: %.0f, Z: %.0f", + mc.player.getX(), mc.player.getY(), mc.player.getZ()); + } + + String jsonPayload = String.format( + "{\"content\":\"%s\"," + + "\"username\":\"LamaESP\"," + + "\"avatar_url\":\"https://minecraft.wiki/images/f/f4/Llama_BE2.png\"," + + "\"embeds\":[{" + + "\"title\":\"🦙 Llama Alert\"," + + "\"description\":\"%s\"," + + "\"color\":16753920," + // Orange color + "\"thumbnail\":{\"url\":\"https://minecraft.wiki/images/f/f4/Llama_BE2.png\"}," + + "\"fields\":[" + + "{\"name\":\"Count\",\"value\":\"%d\",\"inline\":true}," + + "{\"name\":\"Server\",\"value\":\"%s\",\"inline\":true}," + + "{\"name\":\"Coordinates\",\"value\":\"%s\",\"inline\":false}," + + "{\"name\":\"Time\",\"value\":\"\",\"inline\":true}" + + "]," + + "\"footer\":{\"text\":\"Sent by Glazed\"}" + + "}]}", + messageContent.replace("\"", "\\\""), + description.replace("\"", "\\\""), + llamaCount, + serverInfo.replace("\"", "\\\""), + coordinates.replace("\"", "\\\""), + System.currentTimeMillis() / 1000 + ); + + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(url)) + .header("Content-Type", "application/json") + .POST(HttpRequest.BodyPublishers.ofString(jsonPayload)) + .timeout(Duration.ofSeconds(30)) + .build(); + + HttpResponse response = httpClient.send(request, + HttpResponse.BodyHandlers.ofString()); + + if (response.statusCode() == 204) { + info("Webhook notification sent successfully"); + } else { + error("Webhook failed with status: " + response.statusCode()); + } + + } catch (IOException | InterruptedException e) { + error("Failed to send webhook: " + e.getMessage()); + } + }); + } + + private void disconnectFromServer(String reason) { + if (mc.world != null && mc.getNetworkHandler() != null) { + mc.getNetworkHandler().getConnection().disconnect(Text.literal(reason)); + info("Disconnected from server - " + reason); + } + } + + @Override + public void onActivate() { + detectedLlamas.clear(); + } + + @Override + public void onDeactivate() { + detectedLlamas.clear(); + } + + @Override + public String getInfoString() { + return detectedLlamas.isEmpty() ? null : String.valueOf(detectedLlamas.size()); + } + + public enum Mode { + Chat, + Toast, + Both + } +} From 4416ea891fc51e7aff85ead703f08ec8eaf49a58 Mon Sep 17 00:00:00 2001 From: DogDog-sys Date: Sat, 29 Nov 2025 18:46:37 +0000 Subject: [PATCH 2/3] quick fix --- .../com/nnpg/glazed/modules/esp/LamaESP.java | 280 ------------------ 1 file changed, 280 deletions(-) delete mode 100644 src/main/java/com/nnpg/glazed/modules/esp/LamaESP.java diff --git a/src/main/java/com/nnpg/glazed/modules/esp/LamaESP.java b/src/main/java/com/nnpg/glazed/modules/esp/LamaESP.java deleted file mode 100644 index f3f62990..00000000 --- a/src/main/java/com/nnpg/glazed/modules/esp/LamaESP.java +++ /dev/null @@ -1,280 +0,0 @@ -package com.nnpg.glazed.modules.esp; - -import com.nnpg.glazed.GlazedAddon; -import com.nnpg.glazed.VersionUtil; -import meteordevelopment.meteorclient.events.render.Render3DEvent; -import meteordevelopment.meteorclient.settings.*; -import meteordevelopment.meteorclient.systems.modules.Module; -import meteordevelopment.meteorclient.utils.render.MeteorToast; -import meteordevelopment.meteorclient.utils.render.RenderUtils; -import meteordevelopment.meteorclient.utils.render.color.Color; -import meteordevelopment.meteorclient.utils.render.color.SettingColor; -import meteordevelopment.orbit.EventHandler; -import net.minecraft.entity.passive.LlamaEntity; -import net.minecraft.item.Items; -import net.minecraft.text.Text; - -import java.io.IOException; -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.time.Duration; -import java.util.HashSet; -import java.util.Set; -import java.util.concurrent.CompletableFuture; - -public class LamaESP extends Module { - private final SettingGroup sgGeneral = settings.getDefaultGroup(); - private final SettingGroup sgRender = settings.createGroup("Render"); - private final SettingGroup sgwebhook = settings.createGroup("Webhook"); - - - // Render settings - private final Setting showTracers = sgRender.add(new BoolSetting.Builder() - .name("Show Tracers") - .description("Draw tracer lines to llamas") - .defaultValue(true) - .build() - ); - - private final Setting tracerColor = sgRender.add(new ColorSetting.Builder() - .name("Tracer Color") - .description("Color of the tracer lines") - .defaultValue(new SettingColor(255, 165, 0, 127)) // Orange color for llamas - .visible(showTracers::get) - .build() - ); - - private final Setting enableWebhook = sgwebhook.add(new BoolSetting.Builder() - .name("Webhook") - .description("Send webhook notifications when llamas are detected") - .defaultValue(false) - .build() - ); - - private final Setting webhookUrl = sgwebhook.add(new StringSetting.Builder() - .name("Webhook URL") - .description("Discord webhook URL") - .defaultValue("") - .visible(enableWebhook::get) - .build() - ); - - private final Setting selfPing = sgwebhook.add(new BoolSetting.Builder() - .name("Self Ping") - .description("Ping yourself in the webhook message") - .defaultValue(false) - .visible(enableWebhook::get) - .build() - ); - - private final Setting discordId = sgwebhook.add(new StringSetting.Builder() - .name("Discord ID") - .description("Your Discord user ID for pinging") - .defaultValue("") - .visible(() -> enableWebhook.get() && selfPing.get()) - .build() - ); - - private final Setting enableDisconnect = sgGeneral.add(new BoolSetting.Builder() - .name("Disconnect") - .description("Automatically disconnect when llamas are detected") - .defaultValue(false) - .build() - ); - - private final Setting notificationMode = sgGeneral.add(new EnumSetting.Builder() - .name("notification-mode") - .description("How to notify when llamas are detected") - .defaultValue(Mode.Both) - .build() - ); - - private final Setting toggleOnFind = sgGeneral.add(new BoolSetting.Builder() - .name("Toggle when found") - .description("Automatically toggles the module when a llama is detected") - .defaultValue(false) - .build() - ); - - private final Set detectedLlamas = new HashSet<>(); - private final HttpClient httpClient = HttpClient.newBuilder() - .connectTimeout(Duration.ofSeconds(10)) - .build(); - - public LamaESP() { - super(GlazedAddon.esp, "LamaESP", "Detects llamas in the world"); - } - - @EventHandler - private void onRender3D(Render3DEvent event) { - if (mc.player == null || mc.world == null) return; - - Set currentLlamas = new HashSet<>(); - - // Find all llamas in the world - for (net.minecraft.entity.Entity entity : mc.world.getEntities()) { - if (entity instanceof LlamaEntity) { - LlamaEntity llama = (LlamaEntity) entity; - currentLlamas.add(entity.getId()); - - // Draw tracers if enabled - if (showTracers.get()) { - double x = VersionUtil.getPrevX(entity) + (entity.getX() - VersionUtil.getPrevX(entity)) * event.tickDelta; - double y = VersionUtil.getPrevY(entity) + (entity.getY() - VersionUtil.getPrevY(entity)) * event.tickDelta; - double z = VersionUtil.getPrevZ(entity) + (entity.getZ() - VersionUtil.getPrevZ(entity)) * event.tickDelta; - - // Target the center/body of the llama - double height = llama.getBoundingBox().maxY - llama.getBoundingBox().minY; - y += height / 2; - - Color color = new Color(tracerColor.get()); - event.renderer.line(RenderUtils.center.x, RenderUtils.center.y, RenderUtils.center.z, x, y, z, color); - } - } - } - - // Check if we found new llamas - if (!currentLlamas.isEmpty() && !currentLlamas.equals(detectedLlamas)) { - Set newLlamas = new HashSet<>(currentLlamas); - newLlamas.removeAll(detectedLlamas); - - if (!newLlamas.isEmpty()) { - detectedLlamas.addAll(newLlamas); - handleLlamaDetection(newLlamas.size()); - } - } else if (currentLlamas.isEmpty()) { - detectedLlamas.clear(); - } - } - - private void handleLlamaDetection(int llamaCount) { - String message = llamaCount == 1 ? - "Llama detected!" : - String.format("%d llamas detected!", llamaCount); - - switch (notificationMode.get()) { - case Chat -> info("(highlight)%s", message); - case Toast -> mc.getToastManager().add(new MeteorToast(Items.LEAD, title, message)); - case Both -> { - info("(highlight)%s", message); - mc.getToastManager().add(new MeteorToast(Items.LEAD, title, message)); - } - } - - if (enableWebhook.get()) { - sendWebhookNotification(llamaCount); - } - - if (toggleOnFind.get()) { - toggle(); - } - - if (enableDisconnect.get()) { - disconnectFromServer(message); - } - } - - private void sendWebhookNotification(int llamaCount) { - String url = webhookUrl.get().trim(); - if (url.isEmpty()) { - warning("Webhook URL not configured!"); - return; - } - - CompletableFuture.runAsync(() -> { - try { - String serverInfo = mc.getCurrentServerEntry() != null ? - mc.getCurrentServerEntry().address : "Unknown Server"; - - String messageContent = ""; - if (selfPing.get() && !discordId.get().trim().isEmpty()) { - messageContent = String.format("<@%s>", discordId.get().trim()); - } - - String llamaText = llamaCount == 1 ? "llama" : "llamas"; - String description = String.format("%d %s detected!", llamaCount, llamaText); - - // Get current coordinates - String coordinates = "Unknown"; - if (mc.player != null) { - coordinates = String.format("X: %.0f, Y: %.0f, Z: %.0f", - mc.player.getX(), mc.player.getY(), mc.player.getZ()); - } - - String jsonPayload = String.format( - "{\"content\":\"%s\"," + - "\"username\":\"LamaESP\"," + - "\"avatar_url\":\"https://minecraft.wiki/images/f/f4/Llama_BE2.png\"," + - "\"embeds\":[{" + - "\"title\":\"🦙 Llama Alert\"," + - "\"description\":\"%s\"," + - "\"color\":16753920," + // Orange color - "\"thumbnail\":{\"url\":\"https://minecraft.wiki/images/f/f4/Llama_BE2.png\"}," + - "\"fields\":[" + - "{\"name\":\"Count\",\"value\":\"%d\",\"inline\":true}," + - "{\"name\":\"Server\",\"value\":\"%s\",\"inline\":true}," + - "{\"name\":\"Coordinates\",\"value\":\"%s\",\"inline\":false}," + - "{\"name\":\"Time\",\"value\":\"\",\"inline\":true}" + - "]," + - "\"footer\":{\"text\":\"Sent by Glazed\"}" + - "}]}", - messageContent.replace("\"", "\\\""), - description.replace("\"", "\\\""), - llamaCount, - serverInfo.replace("\"", "\\\""), - coordinates.replace("\"", "\\\""), - System.currentTimeMillis() / 1000 - ); - - HttpRequest request = HttpRequest.newBuilder() - .uri(URI.create(url)) - .header("Content-Type", "application/json") - .POST(HttpRequest.BodyPublishers.ofString(jsonPayload)) - .timeout(Duration.ofSeconds(30)) - .build(); - - HttpResponse response = httpClient.send(request, - HttpResponse.BodyHandlers.ofString()); - - if (response.statusCode() == 204) { - info("Webhook notification sent successfully"); - } else { - error("Webhook failed with status: " + response.statusCode()); - } - - } catch (IOException | InterruptedException e) { - error("Failed to send webhook: " + e.getMessage()); - } - }); - } - - private void disconnectFromServer(String reason) { - if (mc.world != null && mc.getNetworkHandler() != null) { - mc.getNetworkHandler().getConnection().disconnect(Text.literal(reason)); - info("Disconnected from server - " + reason); - } - } - - @Override - public void onActivate() { - detectedLlamas.clear(); - } - - @Override - public void onDeactivate() { - detectedLlamas.clear(); - } - - @Override - public String getInfoString() { - return detectedLlamas.isEmpty() ? null : String.valueOf(detectedLlamas.size()); - } - - public enum Mode { - Chat, - Toast, - Both - } -} From 10d9aaae97e475af242652f3ffd828f4a8d421bb Mon Sep 17 00:00:00 2001 From: DogDog-sys Date: Sat, 29 Nov 2025 18:48:18 +0000 Subject: [PATCH 3/3] quick fix --- src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java b/src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java index 07841b51..f1f09633 100644 --- a/src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java +++ b/src/main/java/com/nnpg/glazed/modules/esp/LlamaESP.java @@ -103,8 +103,8 @@ public class LlamaESP extends Module { .connectTimeout(Duration.ofSeconds(10)) .build(); - public LamaESP() { - super(GlazedAddon.esp, "LamaESP", "Detects llamas in the world"); + public LlamaESP() { + super(GlazedAddon.esp, "LlamaESP", "Detects llamas in the world"); } @EventHandler