aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/attack.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2026-03-24 11:15:56 -0500
committerGitHub <noreply@github.com>2026-03-24 11:15:56 -0500
commiteeaf1435e81d9cbd8daa0efa22029c1f259a64b5 (patch)
tree3486e26d5409708370e4e259d240fb77c6e1e439 /azalea-client/src/plugins/attack.rs
parent41a9ae6aaff77646c08c64ac1334a8cc6081c24f (diff)
downloadazalea-drasl-eeaf1435e81d9cbd8daa0efa22029c1f259a64b5.tar.xz
26.1 (#316)
* start updating to 26.1 * start updating to 26.1-snapshot-6 * 26.1-snapshot-6 * 26.1-snapshot-10 * 26.1-rc-1 * fix tests * 26.1-rc-2 and sort default components * 26.1 * update changelog
Diffstat (limited to 'azalea-client/src/plugins/attack.rs')
-rw-r--r--azalea-client/src/plugins/attack.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/azalea-client/src/plugins/attack.rs b/azalea-client/src/plugins/attack.rs
index 41ce114d..4cafc9f8 100644
--- a/azalea-client/src/plugins/attack.rs
+++ b/azalea-client/src/plugins/attack.rs
@@ -1,10 +1,9 @@
use azalea_core::{game_type::GameMode, tick::GameTick};
use azalea_entity::{
- Attributes, Crouching, Physics, indexing::EntityIdIndex, metadata::Sprinting,
- update_bounding_box,
+ Attributes, Physics, indexing::EntityIdIndex, metadata::Sprinting, update_bounding_box,
};
use azalea_physics::PhysicsSystems;
-use azalea_protocol::packets::game::s_interact::{self, ServerboundInteract};
+use azalea_protocol::packets::game::ServerboundAttack;
use bevy_app::{App, Plugin, Update};
use bevy_ecs::prelude::*;
use derive_more::{Deref, DerefMut};
@@ -59,7 +58,6 @@ pub fn handle_attack_queued(
&mut Sprinting,
&AttackQueued,
&LocalGameMode,
- &Crouching,
&EntityIdIndex,
)>,
) {
@@ -70,7 +68,6 @@ pub fn handle_attack_queued(
mut sprinting,
attack_queued,
game_mode,
- crouching,
entity_id_index,
) in &mut query
{
@@ -84,10 +81,8 @@ pub fn handle_attack_queued(
commands.trigger(SendGamePacketEvent::new(
client_entity,
- ServerboundInteract {
+ ServerboundAttack {
entity_id: target_entity_id,
- action: s_interact::ActionType::Attack,
- using_secondary_action: **crouching,
},
));
commands.trigger(SwingArmEvent {