From 9aaf893588eaecd62f6b146897cbce8a3a5058b5 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 12 Oct 2025 22:10:02 -0300 Subject: improve ux for entity matching functions --- azalea/src/pathfinder/moves/mod.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'azalea/src') diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs index bb2354bf..fc574a4c 100644 --- a/azalea/src/pathfinder/moves/mod.rs +++ b/azalea/src/pathfinder/moves/mod.rs @@ -217,19 +217,10 @@ pub struct IsReachedCtx<'a> { #[must_use] pub fn default_is_reached( IsReachedCtx { - position, - target, - physics, - .. + position, target, .. }: IsReachedCtx, ) -> bool { - if BlockPos::from(position) == target { - return true; - } - - // this is to make it handle things like slabs correctly, if we're on the block - // below the target but on_ground - BlockPos::from(position).up(1) == target && physics.on_ground() + player_pos_to_block_pos(position) == target } pub struct PathfinderCtx<'a> { -- cgit v1.2.3