aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorKevin <92656833+kevinthegreat1@users.noreply.github.com>2024-12-22 21:46:48 -0500
committerGitHub <noreply@github.com>2024-12-23 10:46:48 +0800
commitbd39443716d76a854a297263d3a7614ad5c84a0d (patch)
tree6e856331a0a2ea23e2b085a4844fc7a1c0c2d38d /src/main/java
parent69e1ea849e195b07c3b3f9547701332df4f9866b (diff)
downloadSkyblocker-bd39443716d76a854a297263d3a7614ad5c84a0d.tar.gz
Skyblocker-bd39443716d76a854a297263d3a7614ad5c84a0d.tar.bz2
Skyblocker-bd39443716d76a854a297263d3a7614ad5c84a0d.zip
Fix ender nodes detection (#1095)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/end/EnderNodes.java9
-rw-r--r--src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java8
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 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;
+ };
+ }
}
}