aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src/dimensions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-entity/src/dimensions.rs')
-rwxr-xr-xazalea-entity/src/dimensions.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/azalea-entity/src/dimensions.rs b/azalea-entity/src/dimensions.rs
index 5236b80f..3db7e304 100755
--- a/azalea-entity/src/dimensions.rs
+++ b/azalea-entity/src/dimensions.rs
@@ -7,17 +7,12 @@ pub struct EntityDimensions {
}
impl EntityDimensions {
- 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 {
- min_x: pos.x - radius,
- min_y: pos.y,
- min_z: pos.z - radius,
-
- max_x: pos.x + radius,
- max_y: pos.y + height,
- max_z: pos.z + radius,
+ min: Vec3::new(pos.x - radius, pos.y, pos.z - radius),
+ max: Vec3::new(pos.x + radius, pos.y + height, pos.z + radius),
}
}
}