aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src/dimensions.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-01-10 16:45:27 -0600
committerGitHub <noreply@github.com>2025-01-10 16:45:27 -0600
commit0d16f01571ec8315f3979eae46981e559ade1cf9 (patch)
treeea43c32a57b0e6a67579d75a134dfbc009d09781 /azalea-entity/src/dimensions.rs
parent615d8f9d2ac56b3244d328587243301da253eafd (diff)
downloadazalea-drasl-0d16f01571ec8315f3979eae46981e559ade1cf9.tar.xz
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
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),
}
}
}