Skip to content

Commit f36072c

Browse files
authored
Merge pull request #4099 from babbaj/elytra
make raytracer collide with unknown chunks
2 parents 7b911aa + b1be4f2 commit f36072c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ dependencies {
175175
transitive = false
176176
}
177177
launchAnnotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor'
178-
launchImplementation('dev.babbaj:nether-pathfinder:1.2')
179-
implementation 'dev.babbaj:nether-pathfinder:1.2'
178+
launchImplementation('dev.babbaj:nether-pathfinder:1.3.0')
179+
implementation 'dev.babbaj:nether-pathfinder:1.3.0'
180180
testImplementation 'junit:junit:4.12'
181181
}
182182

src/main/java/baritone/process/elytra/NetherPathfinderContext.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public CompletableFuture<PathSegment> pathFindAsync(final BlockPos src, final Bl
129129
*/
130130
public boolean raytrace(final double startX, final double startY, final double startZ,
131131
final double endX, final double endY, final double endZ) {
132-
return NetherPathfinder.isVisible(this.context, true, startX, startY, startZ, endX, endY, endZ);
132+
return NetherPathfinder.isVisible(this.context, NetherPathfinder.CACHE_MISS_SOLID, startX, startY, startZ, endX, endY, endZ);
133133
}
134134

135135
/**
@@ -141,24 +141,24 @@ public boolean raytrace(final double startX, final double startY, final double s
141141
* @return {@code true} if there is visibility between the points
142142
*/
143143
public boolean raytrace(final Vec3d start, final Vec3d end) {
144-
return NetherPathfinder.isVisible(this.context, true, start.x, start.y, start.z, end.x, end.y, end.z);
144+
return NetherPathfinder.isVisible(this.context, NetherPathfinder.CACHE_MISS_SOLID, start.x, start.y, start.z, end.x, end.y, end.z);
145145
}
146146

147147
public boolean raytrace(final int count, final double[] src, final double[] dst, final int visibility) {
148148
switch (visibility) {
149149
case Visibility.ALL:
150-
return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, false) == -1;
150+
return NetherPathfinder.isVisibleMulti(this.context, NetherPathfinder.CACHE_MISS_SOLID, count, src, dst, false) == -1;
151151
case Visibility.NONE:
152-
return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, true) == -1;
152+
return NetherPathfinder.isVisibleMulti(this.context, NetherPathfinder.CACHE_MISS_SOLID, count, src, dst, true) == -1;
153153
case Visibility.ANY:
154-
return NetherPathfinder.isVisibleMulti(this.context, true, count, src, dst, true) != -1;
154+
return NetherPathfinder.isVisibleMulti(this.context, NetherPathfinder.CACHE_MISS_SOLID, count, src, dst, true) != -1;
155155
default:
156156
throw new IllegalArgumentException("lol");
157157
}
158158
}
159159

160160
public void raytrace(final int count, final double[] src, final double[] dst, final boolean[] hitsOut, final double[] hitPosOut) {
161-
NetherPathfinder.raytrace(this.context, true, count, src, dst, hitsOut, hitPosOut);
161+
NetherPathfinder.raytrace(this.context, NetherPathfinder.CACHE_MISS_SOLID, count, src, dst, hitsOut, hitPosOut);
162162
}
163163

164164
public void cancel() {

0 commit comments

Comments
 (0)