diff options
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, |
