From 0d16f01571ec8315f3979eae46981e559ade1cf9 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:45:27 -0600 Subject: Fluid physics (#199) * start implementing fluid physics * Initial implementation of fluid pushing * different travel function in water * bubble columns * jumping in water * cleanup * change ultrawarm to be required * fix for clippy --- azalea-entity/src/dimensions.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'azalea-entity/src/dimensions.rs') 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), } } } -- cgit v1.2.3