diff options
| author | mat <git@matdoes.dev> | 2026-03-28 03:47:48 +0700 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-03-28 03:47:48 +0700 |
| commit | f09d07ce5cc6f8dfa336e214cda95b157bb80ae4 (patch) | |
| tree | f1ed1ddaacef5d75eaef855494265915301c010a | |
| parent | 2d3e4194b885ec499826812da52c965f5a7235cf (diff) | |
| download | azalea-drasl-f09d07ce5cc6f8dfa336e214cda95b157bb80ae4.tar.xz | |
don't follow dead entities in testbot
| -rw-r--r-- | azalea/examples/testbot/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs index 173f2b8c..034a80ad 100644 --- a/azalea/examples/testbot/main.rs +++ b/azalea/examples/testbot/main.rs @@ -186,7 +186,9 @@ async fn handle(bot: Client, event: azalea::Event, state: State) -> eyre::Result killaura::tick(bot.clone(), state.clone())?; if bot.ticks_connected().is_multiple_of(5) { - if let Some(following) = &*state.following_entity.lock() { + if let Some(following) = &*state.following_entity.lock() + && following.is_alive() + { let goal = RadiusGoal::new(following.position(), 3.); if bot.is_calculating_path() { // keep waiting |
