aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/astar
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-05-08 17:20:24 -0100
committermat <git@matdoes.dev>2026-05-08 17:20:24 -0100
commitc963b0a5fbe57423ccda0c3b2bfe108439dd895c (patch)
tree0fd5bf9afe338be979048d492ec18332cb4a222a /azalea/src/pathfinder/astar
parent5e0484c925bd7dd7c1d05fdfaf9cee2e66c07dea (diff)
downloadazalea-drasl-c963b0a5fbe57423ccda0c3b2bfe108439dd895c.tar.xz
several stability fixes for pathfinder when doing long paths
Diffstat (limited to 'azalea/src/pathfinder/astar')
-rw-r--r--azalea/src/pathfinder/astar/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/azalea/src/pathfinder/astar/mod.rs b/azalea/src/pathfinder/astar/mod.rs
index 077ce13a..b2b914b8 100644
--- a/azalea/src/pathfinder/astar/mod.rs
+++ b/azalea/src/pathfinder/astar/mod.rs
@@ -29,8 +29,10 @@ where
}
// used for better results when timing out
-// see https://github.com/cabaletta/baritone/blob/1.19.4/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java#L68
-const COEFFICIENTS: [f32; 7] = [1.5, 2., 2.5, 3., 4., 5., 10.];
+// based on Baritone's implementation (with tweaks), see
+// https://github.com/cabaletta/baritone/blob/1.19.4/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java#L68
+// for more info
+const COEFFICIENTS: [f32; 7] = [1.5, 2., 2.5, 3., 4., 5., 15.];
const MIN_IMPROVEMENT: f32 = 0.01;