Skip to content

Commit

Permalink
Merge pull request #26 from MuradAkh/navig-nullpointer-fix
Browse files Browse the repository at this point in the history
fix null pointer crash when navigating to land
  • Loading branch information
EDToaster authored Feb 4, 2022
2 parents f41e819 + b1817c7 commit 88eb819
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false

# Core properties
mod_version = mc1.16.5-v1.0.0-beta.4
mod_version = mc1.16.5-v1.0.0-beta.5
mod_group = dev.murad.littlelogistics
mod_id = littlelogistics
mod_title = Little Logistics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ public int getNeighbors(PathPoint[] p_222859_1_, PathPoint p_222859_2_) {
return i;
}

private PathPoint getNodeSimple(int p_176159_1_, int p_176159_2_, int p_176159_3_) {
return this.nodes.computeIfAbsent(PathPoint.createHash(p_176159_1_, p_176159_2_, p_176159_3_), (p_215743_3_) -> {
return new PathPoint(p_176159_1_, p_176159_2_, p_176159_3_);
});
}

@Override
public FlaggedPathPoint getGoal(double p_224768_1_, double p_224768_3_, double p_224768_5_) {
return new FlaggedPathPoint(super.getNode(MathHelper.floor(p_224768_1_), MathHelper.floor(p_224768_3_), MathHelper.floor(p_224768_5_)));
return new FlaggedPathPoint(getNodeSimple(MathHelper.floor(p_224768_1_), MathHelper.floor(p_224768_3_), MathHelper.floor(p_224768_5_)));
}

@Override
Expand Down

0 comments on commit 88eb819

Please sign in to comment.