From e9136c9cbbf9010b8352127e129c1cd290f377bd Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:51:12 -0600 Subject: Implement EntityPositionSync (#196) * implement EntityPositionSync * fix EntityPositionSync setting the wrong vec_delta_codec and also move into a RelativeEntityUpdate --- azalea-physics/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-physics/src/lib.rs') diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs index c50095e4..2ca64b1f 100644 --- a/azalea-physics/src/lib.rs +++ b/azalea-physics/src/lib.rs @@ -100,7 +100,7 @@ fn travel( let block_below: Box = block_state_below.into(); let block_friction = block_below.behavior().friction; - let inertia = if physics.on_ground { + let inertia = if physics.on_ground() { block_friction * 0.91 } else { 0.91 @@ -178,7 +178,7 @@ pub fn ai_step( if **jumping { // TODO: jumping in liquids and jump delay - if physics.on_ground { + if physics.on_ground() { jump_from_ground( &mut physics, position, @@ -358,7 +358,7 @@ fn get_friction_influenced_speed( is_sprinting: bool, ) -> f32 { // TODO: have speed & flying_speed fields in entity - if physics.on_ground { + if physics.on_ground() { let speed: f32 = attributes.speed.calculate() as f32; speed * (0.216f32 / (friction * friction * friction)) } else { -- cgit v1.2.3