Skip to content

Commit bd39443

Browse files
Fix ender nodes detection (SkyblockerMod#1095)
1 parent 69e1ea8 commit bd39443

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

Diff for: src/main/java/de/hysky/skyblocker/skyblock/end/EnderNodes.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ public static void onParticle(ParticleS2CPacket packet) {
7878

7979
EnderNode enderNode = enderNodes.computeIfAbsent(pos, EnderNode::new);
8080
IntIntPair particles = enderNode.particles.get(direction);
81-
particles.left(particles.leftInt() + 1);
82-
particles.right(particles.rightInt() + 1);
81+
if (ParticleTypes.PORTAL.getType().equals(particleType)) {
82+
particles.left(particles.leftInt() + 1);
83+
} else if (ParticleTypes.WITCH.getType().equals(particleType)) {
84+
particles.right(particles.rightInt() + 1);
85+
}
8386
}
8487

8588
private static void update() {
@@ -120,7 +123,7 @@ Direction.NORTH, new IntIntMutablePair(0, 0)
120123
private long lastConfirmed;
121124

122125
private EnderNode(BlockPos pos) {
123-
super(pos, () -> SkyblockerConfigManager.get().uiAndVisuals.waypoints.waypointType, ColorUtils.getFloatComponents(DyeColor.CYAN), false);
126+
super(pos, () -> SkyblockerConfigManager.get().uiAndVisuals.waypoints.waypointType.withoutBeacon(), ColorUtils.getFloatComponents(DyeColor.CYAN), false);
124127
}
125128

126129
private void updateParticles() {

Diff for: src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java

+8
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,13 @@ public String asString() {
215215
public String toString() {
216216
return I18n.translate("skyblocker.waypoints.type." + name());
217217
}
218+
219+
public Type withoutBeacon() {
220+
return switch (this) {
221+
case WAYPOINT -> HIGHLIGHT;
222+
case OUTLINED_WAYPOINT -> OUTLINED_HIGHLIGHT;
223+
default -> this;
224+
};
225+
}
218226
}
219227
}

0 commit comments

Comments
 (0)