diff options
| author | mat <git@matdoes.dev> | 2023-10-04 22:54:07 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-04 22:54:07 -0500 |
| commit | 074bb6198393e0ad87a2239f1c563bf41a1fbe59 (patch) | |
| tree | dbce0f6379f16674b9b3f4e5aa3bce170043532c /azalea/src/pathfinder/moves | |
| parent | 9db542f342c40478af230fd65b0bcf8cc069b5be (diff) | |
| download | azalea-drasl-074bb6198393e0ad87a2239f1c563bf41a1fbe59.tar.xz | |
improve pathfinder heuristics
Diffstat (limited to 'azalea/src/pathfinder/moves')
| -rw-r--r-- | azalea/src/pathfinder/moves/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs index 81a184aa..1714f8bc 100644 --- a/azalea/src/pathfinder/moves/mod.rs +++ b/azalea/src/pathfinder/moves/mod.rs @@ -25,6 +25,11 @@ type Edge = astar::Edge<BlockPos, MoveData>; pub type SuccessorsFn = fn(&mut Vec<Edge>, &PathfinderCtx, BlockPos); +pub fn default_move(edges: &mut Vec<Edge>, ctx: &PathfinderCtx, node: BlockPos) { + basic::basic_move(edges, ctx, node); + parkour::parkour_move(edges, ctx, node); +} + #[derive(Clone)] pub struct MoveData { /// Use the context to determine what events should be sent to complete this @@ -272,11 +277,6 @@ pub struct IsReachedCtx<'a> { pub physics: &'a azalea_entity::Physics, } -pub fn default_move(edges: &mut Vec<Edge>, ctx: &PathfinderCtx, node: BlockPos) { - basic::basic_move(edges, ctx, node); - parkour::parkour_move(edges, ctx, node); -} - /// Returns whether the entity is at the node and should start going to the /// next node. #[must_use] |
