aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-10-06 16:08:19 -0500
committermat <git@matdoes.dev>2023-10-06 16:08:26 -0500
commit94ef48d9f2e362167c077b9584e42ed2c71d679f (patch)
tree1670cbdc946ce9574f20f6ed6a49e061394bf602 /azalea-core/src
parent30702d94f65a2bd86c9ac0a7c402675b89ac4364 (diff)
downloadazalea-drasl-94ef48d9f2e362167c077b9584e42ed2c71d679f.tar.xz
make sure pathfinder is always centered on the destination block (fixes tests)
Diffstat (limited to 'azalea-core/src')
-rwxr-xr-xazalea-core/src/position.rs5
1 files changed, 5 insertions, 0 deletions
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]