Skip to content

Commit e4567b6

Browse files
committed
0.15.17 - Try to fix issues
1 parent 7e29b64 commit e4567b6

4 files changed

Lines changed: 36 additions & 30 deletions

File tree

Cargo.lock

Lines changed: 26 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "shaysbot"
3-
version = "0.15.16"
3+
version = "0.15.17"
44
authors = ["Shayne Hartford <shaybox@shaybox.com>"]
55
edition = "2024"
66
description = "My personal Minecraft bot using Azalea"

src/modules/auto_look.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use azalea::{
33
ecs::prelude::*,
44
entity::{metadata::Player, EyeHeight, Position},
55
nearest_entity::EntityFinder,
6+
pathfinder::Pathfinder,
67
physics::PhysicsSet,
78
prelude::*,
89
LookAtEvent,
@@ -21,16 +22,20 @@ impl Plugin for AutoLookPlugin {
2122

2223
impl AutoLookPlugin {
2324
pub fn handle_auto_look(
24-
mut query: Query<(Entity, &GameTicks, &LocalSettings)>,
25+
mut query: Query<(Entity, &Pathfinder, &GameTicks, &LocalSettings)>,
2526
entities: EntityFinder<With<Player>>,
2627
targets: Query<(&Position, Option<&EyeHeight>)>,
2728
mut look_at_events: EventWriter<LookAtEvent>,
2829
) {
29-
for (entity, game_ticks, local_settings) in &mut query {
30+
for (entity, pathfinder, game_ticks, local_settings) in &mut query {
3031
if !local_settings.auto_look.enabled {
3132
continue;
3233
}
3334

35+
if let Some(_goal) = &pathfinder.goal {
36+
continue;
37+
}
38+
3439
if game_ticks.0 % local_settings.auto_look.delay_ticks != 0 {
3540
continue;
3641
}

src/settings/global.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ pub struct GlobalSettings {
4444
pub discord_token: String,
4545

4646
/// Minecraft server ender pearl view distance in blocks.
47-
/// It is better to under-estimate than to over-estimate.
48-
#[default(64)] /* Vanilla/Spigot/Paper/Folia Default */
47+
/// Better to under-estimate than to over-estimate.
48+
#[default(60)] /* Vanilla/Spigot/Paper/Folia Default */
4949
pub pearl_view_distance: i32,
5050

5151
/// Minecraft server address.

0 commit comments

Comments
 (0)