Update `nether-pathfinder` to 0.18

This commit is contained in:
Brady 2023-06-20 13:43:42 -05:00
parent 6c6b44ee65
commit 0ecabdd047
No known key found for this signature in database
GPG Key ID: 73A788379A197567
2 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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");
}