diff options
| -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 |
