aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/src/pathfinder')
-rw-r--r--azalea/src/pathfinder/goals.rs2
-rw-r--r--azalea/src/pathfinder/mod.rs7
-rw-r--r--azalea/src/pathfinder/moves/mod.rs5
-rw-r--r--azalea/src/pathfinder/simulation.rs2
4 files changed, 11 insertions, 5 deletions
diff --git a/azalea/src/pathfinder/goals.rs b/azalea/src/pathfinder/goals.rs
index 7a830973..18ab50c1 100644
--- a/azalea/src/pathfinder/goals.rs
+++ b/azalea/src/pathfinder/goals.rs
@@ -236,7 +236,7 @@ impl Goal for ReachBlockPosGoal {
}
let eye_position = n.center_bottom().up(1.62);
- let look_direction = crate::direction_looking_at(eye_position, self.pos.center());
+ let look_direction = crate::bot::direction_looking_at(eye_position, self.pos.center());
let block_hit_result = azalea_client::interact::pick::pick_block(
look_direction,
eye_position,
diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs
index 736309a2..6fbf0de4 100644
--- a/azalea/src/pathfinder/mod.rs
+++ b/azalea/src/pathfinder/mod.rs
@@ -1,5 +1,8 @@
//! A pathfinding plugin to make bots able to traverse the world.
//!
+//! For the new functions on `Client` that the pathfinder adds, see
+//! [`PathfinderClientExt`].
+//!
//! Much of this code is based on [Baritone](https://github.com/cabaletta/baritone).
pub mod astar;
@@ -59,9 +62,9 @@ use self::{
moves::{ExecuteCtx, IsReachedCtx, SuccessorsFn},
};
use crate::{
- BotClientExt, WalkDirection,
+ WalkDirection,
app::{App, Plugin},
- bot::{JumpEvent, LookAtEvent},
+ bot::{BotClientExt, JumpEvent, LookAtEvent},
ecs::{
component::Component,
entity::Entity,
diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs
index 6d1c7c55..3111516d 100644
--- a/azalea/src/pathfinder/moves/mod.rs
+++ b/azalea/src/pathfinder/moves/mod.rs
@@ -24,7 +24,10 @@ use super::{
rel_block_pos::RelBlockPos,
world::{CachedWorld, is_block_state_passable},
};
-use crate::{JumpEvent, LookAtEvent, auto_tool::best_tool_in_hotbar_for_block};
+use crate::{
+ auto_tool::best_tool_in_hotbar_for_block,
+ bot::{JumpEvent, LookAtEvent},
+};
type Edge = astar::Edge<RelBlockPos, MoveData>;
diff --git a/azalea/src/pathfinder/simulation.rs b/azalea/src/pathfinder/simulation.rs
index 89a8b3c4..78de1642 100644
--- a/azalea/src/pathfinder/simulation.rs
+++ b/azalea/src/pathfinder/simulation.rs
@@ -63,7 +63,7 @@ fn create_simulation_instance(chunks: ChunkStorage) -> (App, Arc<RwLock<Instance
azalea_entity::EntityPlugin,
azalea_client::movement::MovementPlugin,
super::PathfinderPlugin,
- crate::BotPlugin,
+ crate::bot::BotPlugin,
azalea_client::task_pool::TaskPoolPlugin::default(),
// for mining
azalea_client::inventory::InventoryPlugin,