diff options
| author | mat <git@matdoes.dev> | 2025-06-11 22:58:41 -0630 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-11 22:58:41 -0630 |
| commit | a2606569bb79867d07a075bcf7b05730e4264d72 (patch) | |
| tree | fb97fb52aa0c4d7575f6bd5e4e36c2f01c87f942 /azalea/src/pathfinder/goals.rs | |
| parent | 89ddd5e85f4f2fb98697df15528df6e07a3ddd07 (diff) | |
| download | azalea-drasl-a2606569bb79867d07a075bcf7b05730e4264d72.tar.xz | |
use owned instead of borrowed Vec3 more
Diffstat (limited to 'azalea/src/pathfinder/goals.rs')
| -rw-r--r-- | azalea/src/pathfinder/goals.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/azalea/src/pathfinder/goals.rs b/azalea/src/pathfinder/goals.rs index c19bf504..95786561 100644 --- a/azalea/src/pathfinder/goals.rs +++ b/azalea/src/pathfinder/goals.rs @@ -230,16 +230,16 @@ impl Goal for ReachBlockPosGoal { } // only do the expensive check if we're close enough - let distance = self.pos.distance_squared_to(&n); - if distance > self.max_check_distance.pow(2) { + let distance_squared = self.pos.distance_squared_to(n); + if distance_squared > self.max_check_distance.pow(2) { return false; } let eye_position = n.center_bottom().up(1.62); - let look_direction = crate::direction_looking_at(&eye_position, &self.pos.center()); + let look_direction = crate::direction_looking_at(eye_position, self.pos.center()); let block_hit_result = azalea_client::interact::pick_block( - &look_direction, - &eye_position, + look_direction, + eye_position, &self.chunk_storage, self.distance, ); |
