diff --git a/Cargo.lock b/Cargo.lock index 6b7043c..af28c50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3185,7 +3185,7 @@ dependencies = [ [[package]] name = "shaysbot" -version = "0.6.3" +version = "0.6.4" dependencies = [ "anyhow", "azalea", diff --git a/Cargo.toml b/Cargo.toml index 0a9e1ea..90bb4f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shaysbot" -version = "0.6.3" +version = "0.6.4" authors = ["Shayne Hartford "] edition = "2021" description = "My personal Minecraft bot using Azalea" diff --git a/src/plugins/auto_pearl.rs b/src/plugins/auto_pearl.rs index fb26f46..7f66345 100644 --- a/src/plugins/auto_pearl.rs +++ b/src/plugins/auto_pearl.rs @@ -151,11 +151,16 @@ pub fn handle_pearl_pull_event( }); // Return to the idle position + let pos = settings.idle_pos; + if pos.x == -0.0 && pos.y == -0.0 && pos.z == -0.0 { + continue; + }; + #[allow(clippy::cast_possible_truncation)] let pos = BlockPos { - x: settings.idle_pos.x as i32, - y: settings.idle_pos.y as i32, - z: settings.idle_pos.z as i32, + x: pos.x as i32, + y: pos.y as i32, + z: pos.z as i32, }; let goal = ReachBlockPosGoal { diff --git a/src/plugins/pearl_tracker.rs b/src/plugins/pearl_tracker.rs index deaf304..be18670 100644 --- a/src/plugins/pearl_tracker.rs +++ b/src/plugins/pearl_tracker.rs @@ -75,9 +75,8 @@ pub fn handle_add_entity_packet( continue; }; - /* Player is outside visual range */ let owner_uuid = if packet.data == 0 { - Uuid::max() + Uuid::max() /* Player is offline */ } else if let Some((_, profile)) = profiles .iter() .find(|(id, _)| i32::try_from(id.0).unwrap() == packet.data)