aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/src/pathfinder')
-rw-r--r--azalea/src/pathfinder/debug.rs2
-rw-r--r--azalea/src/pathfinder/mod.rs6
-rw-r--r--azalea/src/pathfinder/tests.rs2
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();