diff options
| author | mat <git@matdoes.dev> | 2025-12-16 05:38:10 -0530 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-16 05:38:10 -0530 |
| commit | 9bd529277f5025805da95f081657c180972e487e (patch) | |
| tree | bc63fd6e06df99f2bd09abd35ded4217f68a3904 | |
| parent | 188428950722ccaa9b163c12fca92133f18316ba (diff) | |
| download | azalea-drasl-9bd529277f5025805da95f081657c180972e487e.tar.xz | |
fix packet order for attacking and sprinting
| -rw-r--r-- | azalea-client/src/plugins/attack.rs | 3 | ||||
| -rw-r--r-- | azalea-client/src/plugins/movement.rs | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/azalea-client/src/plugins/attack.rs b/azalea-client/src/plugins/attack.rs index eca41503..baab4333 100644 --- a/azalea-client/src/plugins/attack.rs +++ b/azalea-client/src/plugins/attack.rs @@ -32,9 +32,10 @@ impl Plugin for AttackPlugin { ( increment_ticks_since_last_attack, update_attack_strength_scale.after(PhysicsSystems), + // in vanilla, handle_attack_queued is part of `handleKeybinds` handle_attack_queued + .before(super::movement::send_sprinting_if_needed) .before(super::tick_end::game_tick_packet) - .after(super::movement::send_sprinting_if_needed) .before(super::movement::send_position), ) .chain(), diff --git a/azalea-client/src/plugins/movement.rs b/azalea-client/src/plugins/movement.rs index 15d4a468..fd85de2d 100644 --- a/azalea-client/src/plugins/movement.rs +++ b/azalea-client/src/plugins/movement.rs @@ -25,7 +25,7 @@ use azalea_protocol::{ s_move_player_pos::ServerboundMovePlayerPos, s_move_player_pos_rot::ServerboundMovePlayerPosRot, s_move_player_rot::ServerboundMovePlayerRot, - s_move_player_status_only::ServerboundMovePlayerStatusOnly, + s_move_player_status_only::ServerboundMovePlayerStatusOnly, s_player_command, }, }, }; @@ -283,9 +283,9 @@ pub fn send_sprinting_if_needed( let was_sprinting = physics_state.was_sprinting; if **sprinting != was_sprinting { let sprinting_action = if **sprinting { - azalea_protocol::packets::game::s_player_command::Action::StartSprinting + s_player_command::Action::StartSprinting } else { - azalea_protocol::packets::game::s_player_command::Action::StopSprinting + s_player_command::Action::StopSprinting }; commands.trigger(SendGamePacketEvent::new( entity, |
