diff options
| author | mat <git@matdoes.dev> | 2025-12-15 11:14:40 +0930 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-15 11:14:40 +0930 |
| commit | dcbd690f21665e22ea250024a1aa85dec34e6c9e (patch) | |
| tree | 411c76eb92ca1cfe284e56f47bc0abd4079a3364 /azalea-client/src/plugins/attack.rs | |
| parent | b0a2a809331b0f781517649857d31e0aec67d300 (diff) | |
| download | azalea-drasl-dcbd690f21665e22ea250024a1aa85dec34e6c9e.tar.xz | |
sort derives with cargo sort-derives
might add to ci later, unsure how to do it without adding significant friction for contributors though
Diffstat (limited to 'azalea-client/src/plugins/attack.rs')
| -rw-r--r-- | azalea-client/src/plugins/attack.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<AttackEvent>, 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)>, |
