From 0ecabdd04714e68ac27e080e9c7831b3547e767c Mon Sep 17 00:00:00 2001 From: Brady Date: Tue, 20 Jun 2023 13:43:42 -0500 Subject: [PATCH] Update `nether-pathfinder` to 0.18 --- build.gradle | 4 ++-- .../baritone/behavior/elytra/NetherPathfinderContext.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 7608c07ad..41a495f4f 100755 --- a/build.gradle +++ b/build.gradle @@ -175,9 +175,9 @@ dependencies { transitive = false } launchAnnotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor' - launchImplementation('dev.babbaj:nether-pathfinder:0.17') + launchImplementation('dev.babbaj:nether-pathfinder:0.18') testImplementation 'junit:junit:4.12' - implementation 'dev.babbaj:nether-pathfinder:0.17' + implementation 'dev.babbaj:nether-pathfinder:0.18' } mixin { diff --git a/src/main/java/baritone/behavior/elytra/NetherPathfinderContext.java b/src/main/java/baritone/behavior/elytra/NetherPathfinderContext.java index befb5163a..f269cd33b 100644 --- a/src/main/java/baritone/behavior/elytra/NetherPathfinderContext.java +++ b/src/main/java/baritone/behavior/elytra/NetherPathfinderContext.java @@ -82,11 +82,11 @@ public final class NetherPathfinderContext { public boolean raytrace(final int count, final double[] src, final double[] dst, final int visibility) { switch (visibility) { case Visibility.ALL: - return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, false); + return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, false) == -1; case Visibility.NONE: - return !NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, true); + return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, true) == -1; case Visibility.ANY: - return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, true); + return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, true) != -1; } throw new IllegalArgumentException("lol"); }