From 94ef48d9f2e362167c077b9584e42ed2c71d679f Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 6 Oct 2023 16:08:19 -0500 Subject: make sure pathfinder is always centered on the destination block (fixes tests) --- azalea-core/src/position.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'azalea-core/src') diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index 540419ba..630a3a55 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -39,6 +39,11 @@ macro_rules! vec3_impl { self.x * self.x + self.z * self.z } + #[inline] + pub fn horizontal_distance_to_sqr(&self, other: &Self) -> $type { + (self - other).horizontal_distance_sqr() + } + /// Return a new instance of this position with the y coordinate /// decreased by the given number. #[inline] -- cgit v1.2.3