diff options
| author | mat <git@matdoes.dev> | 2025-09-27 18:41:36 -1030 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-09-27 20:26:41 -0845 |
| commit | 74dcb7b37d953ec4d45dd6aac4c8e598c87def7d (patch) | |
| tree | 22e6ab1849ee01d40f3d484ea0c8db52aa6649b5 /azalea-entity/src | |
| parent | 63bef6486dc1f3c9ef4b4f0d71e139d7035b6432 (diff) | |
| download | azalea-drasl-74dcb7b37d953ec4d45dd6aac4c8e598c87def7d.tar.xz | |
allow picking other bots in hit results
Diffstat (limited to 'azalea-entity/src')
| -rw-r--r-- | azalea-entity/src/dimensions.rs | 6 | ||||
| -rw-r--r-- | azalea-entity/src/lib.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/azalea-entity/src/dimensions.rs b/azalea-entity/src/dimensions.rs index 92c03e61..b3a69dc1 100644 --- a/azalea-entity/src/dimensions.rs +++ b/azalea-entity/src/dimensions.rs @@ -1,4 +1,4 @@ -use azalea_core::{aabb::AABB, position::Vec3}; +use azalea_core::{aabb::Aabb, position::Vec3}; use azalea_registry::EntityKind; use bevy_ecs::component::Component; @@ -40,10 +40,10 @@ impl EntityDimensions { Self { eye_height, ..self } } - pub fn make_bounding_box(&self, pos: Vec3) -> AABB { + pub fn make_bounding_box(&self, pos: Vec3) -> Aabb { let radius = (self.width / 2.0) as f64; let height = self.height as f64; - AABB { + Aabb { min: Vec3::new(pos.x - radius, pos.y, pos.z - radius), max: Vec3::new(pos.x + radius, pos.y + height, pos.z + radius), } diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs index 6c3603e6..1ffce394 100644 --- a/azalea-entity/src/lib.rs +++ b/azalea-entity/src/lib.rs @@ -21,7 +21,7 @@ pub use attributes::Attributes; use azalea_block::{BlockState, fluid_state::FluidKind}; use azalea_buf::AzBuf; use azalea_core::{ - aabb::AABB, + aabb::Aabb, math, position::{BlockPos, ChunkPos, Vec3}, resource_location::ResourceLocation, @@ -355,7 +355,7 @@ pub struct Physics { /// The bounding box of the entity. This is more than just width and height, /// unlike dimensions. - pub bounding_box: AABB, + pub bounding_box: Aabb, pub has_impulse: bool, |
