From dcbd690f21665e22ea250024a1aa85dec34e6c9e Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 15 Dec 2025 11:14:40 +0930 Subject: sort derives with cargo sort-derives might add to ci later, unsure how to do it without adding significant friction for contributors though --- azalea-client/src/plugins/attack.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-client/src/plugins/attack.rs') diff --git a/azalea-client/src/plugins/attack.rs b/azalea-client/src/plugins/attack.rs index 7550ed19..eca41503 100644 --- a/azalea-client/src/plugins/attack.rs +++ b/azalea-client/src/plugins/attack.rs @@ -87,7 +87,7 @@ impl Client { /// A component that indicates that this client will be attacking the given /// entity next tick. -#[derive(Component, Clone, Debug)] +#[derive(Clone, Component, Debug)] pub struct AttackQueued { pub target: Entity, } @@ -166,13 +166,13 @@ pub fn handle_attack_event(mut events: MessageReader, mut commands: } } -#[derive(Default, Bundle)] +#[derive(Bundle, Default)] pub struct AttackBundle { pub ticks_since_last_attack: TicksSinceLastAttack, pub attack_strength_scale: AttackStrengthScale, } -#[derive(Default, Component, Clone, Deref, DerefMut)] +#[derive(Clone, Component, Default, Deref, DerefMut)] pub struct TicksSinceLastAttack(pub u32); pub fn increment_ticks_since_last_attack(mut query: Query<&mut TicksSinceLastAttack>) { for mut ticks_since_last_attack in query.iter_mut() { @@ -180,7 +180,7 @@ pub fn increment_ticks_since_last_attack(mut query: Query<&mut TicksSinceLastAtt } } -#[derive(Default, Component, Clone, Deref, DerefMut)] +#[derive(Clone, Component, Default, Deref, DerefMut)] pub struct AttackStrengthScale(pub f32); pub fn update_attack_strength_scale( mut query: Query<(&TicksSinceLastAttack, &Attributes, &mut AttackStrengthScale)>, -- cgit v1.2.3