diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-28 04:31:29 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-28 04:31:29 -0600 |
| commit | 20c7e27250148f62bab9e7b99e4f0cd6deb82325 (patch) | |
| tree | 163b312ef4dc72c5c23be923f8ca17cdf2a7278c /azalea/src/pathfinder | |
| parent | 7ab3b8924f64f7eadb6b8928b6fae73cb06e4c2f (diff) | |
| download | azalea-drasl-20c7e27250148f62bab9e7b99e4f0cd6deb82325.tar.xz | |
Change Client::component to return a reference (#298)
* change Client::component to return a reference
* write docs
* merge main
* remove unused parking_lot feature
Diffstat (limited to 'azalea/src/pathfinder')
| -rw-r--r-- | azalea/src/pathfinder/debug.rs | 2 | ||||
| -rw-r--r-- | azalea/src/pathfinder/mod.rs | 6 | ||||
| -rw-r--r-- | azalea/src/pathfinder/tests.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/azalea/src/pathfinder/debug.rs b/azalea/src/pathfinder/debug.rs index f8dc1193..25f82946 100644 --- a/azalea/src/pathfinder/debug.rs +++ b/azalea/src/pathfinder/debug.rs @@ -22,7 +22,7 @@ use super::ExecutingPath; /// match event { /// azalea::Event::Init => { /// bot.ecs -/// .lock() +/// .write() /// .entity_mut(bot.entity) /// .insert(PathfinderDebugParticles); /// } diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 155261cc..8a6e5ef2 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -242,17 +242,17 @@ impl PathfinderClientExt for Client { } fn start_goto_with_opts(&self, goal: impl Goal + 'static, opts: PathfinderOpts) { self.ecs - .lock() + .write() .write_message(GotoEvent::new(self.entity, goal, opts)); } fn stop_pathfinding(&self) { - self.ecs.lock().write_message(StopPathfindingEvent { + self.ecs.write().write_message(StopPathfindingEvent { entity: self.entity, force: false, }); } fn force_stop_pathfinding(&self) { - self.ecs.lock().write_message(StopPathfindingEvent { + self.ecs.write().write_message(StopPathfindingEvent { entity: self.entity, force: true, }); diff --git a/azalea/src/pathfinder/tests.rs b/azalea/src/pathfinder/tests.rs index 6f4f7cb7..0297e425 100644 --- a/azalea/src/pathfinder/tests.rs +++ b/azalea/src/pathfinder/tests.rs @@ -94,7 +94,7 @@ pub fn wait_until_bot_starts_moving(simulation: &mut Simulation) { let start_time = Instant::now(); while simulation.position() == start_pos && !simulation.is_mining() - && start_time.elapsed() < Duration::from_millis(500) + && start_time.elapsed() < Duration::from_millis(1000) { simulation.tick(); thread::yield_now(); |
