diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2024-12-11 19:51:12 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-11 19:51:12 -0600 |
| commit | e9136c9cbbf9010b8352127e129c1cd290f377bd (patch) | |
| tree | db83316a273153106dd3b343c9d6d4fce234d132 /azalea-client/src/movement.rs | |
| parent | 23932003d98db0f5f976146aa9a11e5d04a74695 (diff) | |
| download | azalea-drasl-e9136c9cbbf9010b8352127e129c1cd290f377bd.tar.xz | |
Implement EntityPositionSync (#196)
* implement EntityPositionSync
* fix EntityPositionSync setting the wrong vec_delta_codec and also move into a RelativeEntityUpdate
Diffstat (limited to 'azalea-client/src/movement.rs')
| -rw-r--r-- | azalea-client/src/movement.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/azalea-client/src/movement.rs b/azalea-client/src/movement.rs index 03183e24..bdc29f2f 100644 --- a/azalea-client/src/movement.rs +++ b/azalea-client/src/movement.rs @@ -195,7 +195,7 @@ pub fn send_position( pos: **position, x_rot: direction.x_rot, y_rot: direction.y_rot, - on_ground: physics.on_ground, + on_ground: physics.on_ground(), } .into_variant(), ) @@ -205,7 +205,7 @@ pub fn send_position( x: position.x, y: position.y, z: position.z, - on_ground: physics.on_ground, + on_ground: physics.on_ground(), } .into_variant(), ) @@ -214,14 +214,14 @@ pub fn send_position( ServerboundMovePlayerRot { x_rot: direction.x_rot, y_rot: direction.y_rot, - on_ground: physics.on_ground, + on_ground: physics.on_ground(), } .into_variant(), ) - } else if physics.last_on_ground != physics.on_ground { + } else if physics.last_on_ground() != physics.on_ground() { Some( ServerboundMovePlayerStatusOnly { - on_ground: physics.on_ground, + on_ground: physics.on_ground(), } .into_variant(), ) @@ -238,7 +238,8 @@ pub fn send_position( last_direction.x_rot = direction.x_rot; } - physics.last_on_ground = physics.on_ground; + let on_ground = physics.on_ground(); + physics.set_last_on_ground(on_ground); // minecraft checks for autojump here, but also autojump is bad so packet |
