From 299124b9e7c43b0d3c0e62f5af0970d35b3374ed Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Sun, 22 Dec 2024 11:13:41 -0800 Subject: [PATCH] Fix ender nodes detection --- .../de/hysky/skyblocker/skyblock/end/EnderNodes.java | 9 ++++++--- .../de/hysky/skyblocker/utils/waypoint/Waypoint.java | 8 ++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/end/EnderNodes.java b/src/main/java/de/hysky/skyblocker/skyblock/end/EnderNodes.java index cf1d4a9cbb..118f480a8d 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/end/EnderNodes.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/end/EnderNodes.java @@ -78,8 +78,11 @@ public static void onParticle(ParticleS2CPacket packet) { EnderNode enderNode = enderNodes.computeIfAbsent(pos, EnderNode::new); IntIntPair particles = enderNode.particles.get(direction); - particles.left(particles.leftInt() + 1); - particles.right(particles.rightInt() + 1); + if (ParticleTypes.PORTAL.getType().equals(particleType)) { + particles.left(particles.leftInt() + 1); + } else if (ParticleTypes.WITCH.getType().equals(particleType)) { + particles.right(particles.rightInt() + 1); + } } private static void update() { @@ -120,7 +123,7 @@ Direction.NORTH, new IntIntMutablePair(0, 0) private long lastConfirmed; private EnderNode(BlockPos pos) { - super(pos, () -> SkyblockerConfigManager.get().uiAndVisuals.waypoints.waypointType, ColorUtils.getFloatComponents(DyeColor.CYAN), false); + super(pos, () -> SkyblockerConfigManager.get().uiAndVisuals.waypoints.waypointType.withoutBeacon(), ColorUtils.getFloatComponents(DyeColor.CYAN), false); } private void updateParticles() { diff --git a/src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java b/src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java index a5c5d25164..499e605dd9 100644 --- a/src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java +++ b/src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java @@ -215,5 +215,13 @@ public String asString() { public String toString() { return I18n.translate("skyblocker.waypoints.type." + name()); } + + public Type withoutBeacon() { + return switch (this) { + case WAYPOINT -> HIGHLIGHT; + case OUTLINED_WAYPOINT -> OUTLINED_HIGHLIGHT; + default -> this; + }; + } } }