From b1be4f29adf8fbdc785e04e4221fc46ceb471e27 Mon Sep 17 00:00:00 2001 From: Babbaj Date: Tue, 15 Aug 2023 01:14:53 -0400 Subject: [PATCH] make raytracer collide with unknown chunks --- build.gradle | 4 ++-- .../process/elytra/NetherPathfinderContext.java | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 0c8e58364..b9e486351 100755 --- a/build.gradle +++ b/build.gradle @@ -175,8 +175,8 @@ dependencies { transitive = false } launchAnnotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor' - launchImplementation('dev.babbaj:nether-pathfinder:1.2') - implementation 'dev.babbaj:nether-pathfinder:1.2' + launchImplementation('dev.babbaj:nether-pathfinder:1.3.0') + implementation 'dev.babbaj:nether-pathfinder:1.3.0' testImplementation 'junit:junit:4.12' } diff --git a/src/main/java/baritone/process/elytra/NetherPathfinderContext.java b/src/main/java/baritone/process/elytra/NetherPathfinderContext.java index 93e0587f0..55a780a79 100644 --- a/src/main/java/baritone/process/elytra/NetherPathfinderContext.java +++ b/src/main/java/baritone/process/elytra/NetherPathfinderContext.java @@ -129,7 +129,7 @@ public final class NetherPathfinderContext { */ public boolean raytrace(final double startX, final double startY, final double startZ, final double endX, final double endY, final double endZ) { - return NetherPathfinder.isVisible(this.context, true, startX, startY, startZ, endX, endY, endZ); + return NetherPathfinder.isVisible(this.context, NetherPathfinder.CACHE_MISS_SOLID, startX, startY, startZ, endX, endY, endZ); } /** @@ -141,24 +141,24 @@ public final class NetherPathfinderContext { * @return {@code true} if there is visibility between the points */ public boolean raytrace(final Vec3d start, final Vec3d end) { - return NetherPathfinder.isVisible(this.context, true, start.x, start.y, start.z, end.x, end.y, end.z); + return NetherPathfinder.isVisible(this.context, NetherPathfinder.CACHE_MISS_SOLID, start.x, start.y, start.z, end.x, end.y, end.z); } 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) == -1; + return NetherPathfinder.isVisibleMulti(this.context, NetherPathfinder.CACHE_MISS_SOLID, count, src, dst, false) == -1; case Visibility.NONE: - return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, true) == -1; + return NetherPathfinder.isVisibleMulti(this.context, NetherPathfinder.CACHE_MISS_SOLID, count, src, dst, true) == -1; case Visibility.ANY: - return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, true) != -1; + return NetherPathfinder.isVisibleMulti(this.context, NetherPathfinder.CACHE_MISS_SOLID, count, src, dst, true) != -1; default: throw new IllegalArgumentException("lol"); } } public void raytrace(final int count, final double[] src, final double[] dst, final boolean[] hitsOut, final double[] hitPosOut) { - NetherPathfinder.raytrace(this.context, true, count, src, dst, hitsOut, hitPosOut); + NetherPathfinder.raytrace(this.context, NetherPathfinder.CACHE_MISS_SOLID, count, src, dst, hitsOut, hitPosOut); } public void cancel() {