From 9c2c7c3497a74e80d7186fdcd97ce2518520faa6 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 6 Jan 2026 04:26:29 +0200 Subject: pathfinder fixes and api improvements don't pathfind on magma, fix mining blocks while swimming, fix RadiusGoal heuristic, and add Client::physics, is_executing_path, and is_calculating_path --- azalea/src/entity_ref/shared_impls.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'azalea/src/entity_ref/shared_impls.rs') diff --git a/azalea/src/entity_ref/shared_impls.rs b/azalea/src/entity_ref/shared_impls.rs index 1dafbde2..9ef396a0 100644 --- a/azalea/src/entity_ref/shared_impls.rs +++ b/azalea/src/entity_ref/shared_impls.rs @@ -1,6 +1,6 @@ use azalea_core::position::Vec3; use azalea_entity::{ - Attributes, Dead, EntityUuid, Position, dimensions::EntityDimensions, metadata::Health, + Attributes, Dead, EntityUuid, Physics, Position, dimensions::EntityDimensions, metadata::Health, }; use azalea_world::{InstanceName, MinecraftEntityId}; use uuid::Uuid; @@ -191,4 +191,16 @@ impl_entity_functions! { pub fn exists(&self) -> bool { self.try_query_self::, _>(|entity_id| entity_id.is_some()).unwrap_or(false) } + + Client: + /// Returns the complete [`Physics`] data for this client, including velocity, bounding box, + /// collisions, etc. + EntityRef: + /// Returns the complete [`Physics`] data for this entity, including velocity, bounding box, + /// collisions, etc. + /// + /// Also see [`Client::physics`]. + pub fn physics(&self) -> Physics { + self.component::().clone() + } } -- cgit v1.2.3