From bd39443716d76a854a297263d3a7614ad5c84a0d Mon Sep 17 00:00:00 2001 From: Kevin <92656833+kevinthegreat1@users.noreply.github.com> Date: Sun, 22 Dec 2024 21:46:48 -0500 Subject: Fix ender nodes detection (#1095) --- src/main/java/de/hysky/skyblocker/skyblock/end/EnderNodes.java | 9 ++++++--- src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java | 8 ++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 cf1d4a9c..118f480a 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 class EnderNodes { 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 @@ public class EnderNodes { 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 a5c5d251..499e605d 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 class Waypoint implements Renderable { 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; + }; + } } } -- cgit