From f09d07ce5cc6f8dfa336e214cda95b157bb80ae4 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 Mar 2026 03:47:48 +0700 Subject: don't follow dead entities in testbot --- azalea/examples/testbot/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'azalea/examples') 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 -- cgit v1.2.3