diff options
| author | mat <git@matdoes.dev> | 2024-12-25 03:00:48 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-25 03:00:48 +0000 |
| commit | 0ee9ed50e30222784d094e20302cadc879f2b6db (patch) | |
| tree | f5d730bb298c83e30f67d748d1c5e69d602c1200 /azalea/src/pathfinder/moves/mod.rs | |
| parent | d67aa07c13c335b135080efc59f82df69aa34a95 (diff) | |
| download | azalea-drasl-0ee9ed50e30222784d094e20302cadc879f2b6db.tar.xz | |
optimize pathfinder
Diffstat (limited to 'azalea/src/pathfinder/moves/mod.rs')
| -rw-r--r-- | azalea/src/pathfinder/moves/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs index 1a435b5f..68c65d5d 100644 --- a/azalea/src/pathfinder/moves/mod.rs +++ b/azalea/src/pathfinder/moves/mod.rs @@ -16,15 +16,16 @@ use parking_lot::RwLock; use super::{ astar, mining::MiningCache, + rel_block_pos::RelBlockPos, world::{is_block_state_passable, CachedWorld}, }; use crate::{auto_tool::best_tool_in_hotbar_for_block, JumpEvent, LookAtEvent}; -type Edge = astar::Edge<BlockPos, MoveData>; +type Edge = astar::Edge<RelBlockPos, MoveData>; -pub type SuccessorsFn = fn(&mut PathfinderCtx, BlockPos); +pub type SuccessorsFn = fn(&mut PathfinderCtx, RelBlockPos); -pub fn default_move(ctx: &mut PathfinderCtx, node: BlockPos) { +pub fn default_move(ctx: &mut PathfinderCtx, node: RelBlockPos) { basic::basic_move(ctx, node); parkour::parkour_move(ctx, node); } |
