diff options
| author | mat <git@matdoes.dev> | 2025-06-09 21:33:21 -0330 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-09 21:33:21 -0330 |
| commit | e4ead93f195d3d91fd809dfc8cfee9cc36aabcbc (patch) | |
| tree | 3be2352136fb71433a57a9cbf938005e8e7f9b5b /azalea/src/pathfinder/goals.rs | |
| parent | 086f979a2895e7f15ec61e5704869a0cfc94d16f (diff) | |
| download | azalea-drasl-e4ead93f195d3d91fd809dfc8cfee9cc36aabcbc.tar.xz | |
jump if in water while executing pathfinder path
Diffstat (limited to 'azalea/src/pathfinder/goals.rs')
| -rw-r--r-- | azalea/src/pathfinder/goals.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/azalea/src/pathfinder/goals.rs b/azalea/src/pathfinder/goals.rs index 4c0dbafa..c19bf504 100644 --- a/azalea/src/pathfinder/goals.rs +++ b/azalea/src/pathfinder/goals.rs @@ -1,6 +1,9 @@ //! The goals that a pathfinder can try to reach. -use std::{f32::consts::SQRT_2, fmt::Debug}; +use std::{ + f32::consts::SQRT_2, + fmt::{self, Debug}, +}; use azalea_core::position::{BlockPos, Vec3}; use azalea_world::ChunkStorage; @@ -193,7 +196,7 @@ impl<T: Goal> Goal for AndGoals<T> { } /// Move to a position where we can reach the given block. -#[derive(Clone, Debug)] +#[derive(Clone)] pub struct ReachBlockPosGoal { pub pos: BlockPos, pub distance: f64, @@ -244,3 +247,12 @@ impl Goal for ReachBlockPosGoal { block_hit_result.block_pos == self.pos } } +impl Debug for ReachBlockPosGoal { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ReachBlockPosGoal") + .field("pos", &self.pos) + .field("distance", &self.distance) + .field("max_check_distance", &self.max_check_distance) + .finish() + } +} |
