aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-12-15 11:14:40 +0930
committermat <git@matdoes.dev>2025-12-15 11:14:40 +0930
commitdcbd690f21665e22ea250024a1aa85dec34e6c9e (patch)
tree411c76eb92ca1cfe284e56f47bc0abd4079a3364 /azalea-client/src
parentb0a2a809331b0f781517649857d31e0aec67d300 (diff)
downloadazalea-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')
-rw-r--r--azalea-client/src/account.rs4
-rw-r--r--azalea-client/src/client.rs4
-rw-r--r--azalea-client/src/local_player.rs12
-rw-r--r--azalea-client/src/ping.rs2
-rw-r--r--azalea-client/src/player.rs4
-rw-r--r--azalea-client/src/plugins/attack.rs8
-rw-r--r--azalea-client/src/plugins/auto_reconnect.rs4
-rw-r--r--azalea-client/src/plugins/block_update.rs2
-rw-r--r--azalea-client/src/plugins/chat/mod.rs4
-rw-r--r--azalea-client/src/plugins/chunks.rs2
-rw-r--r--azalea-client/src/plugins/connection.rs2
-rw-r--r--azalea-client/src/plugins/disconnect.rs2
-rw-r--r--azalea-client/src/plugins/events.rs2
-rw-r--r--azalea-client/src/plugins/interact/mod.rs8
-rw-r--r--azalea-client/src/plugins/interact/pick.rs2
-rw-r--r--azalea-client/src/plugins/inventory/equipment_effects.rs2
-rw-r--r--azalea-client/src/plugins/inventory/mod.rs8
-rw-r--r--azalea-client/src/plugins/join.rs4
-rw-r--r--azalea-client/src/plugins/mining.rs20
-rw-r--r--azalea-client/src/plugins/movement.rs8
-rw-r--r--azalea-client/src/plugins/packet/config/events.rs6
-rw-r--r--azalea-client/src/plugins/packet/game/events.rs20
-rw-r--r--azalea-client/src/plugins/packet/login/events.rs8
-rw-r--r--azalea-client/src/plugins/packet/login/mod.rs2
-rw-r--r--azalea-client/src/plugins/respawn.rs2
-rw-r--r--azalea-client/src/plugins/tick_broadcast.rs4
-rw-r--r--azalea-client/src/plugins/tick_counter.rs2
27 files changed, 74 insertions, 74 deletions
diff --git a/azalea-client/src/account.rs b/azalea-client/src/account.rs
index ea49368e..f988ade9 100644
--- a/azalea-client/src/account.rs
+++ b/azalea-client/src/account.rs
@@ -33,7 +33,7 @@ use uuid::Uuid;
///
/// [`Client::join`]: crate::Client::join
/// [`azalea::ClientBuilder`]: https://docs.rs/azalea/latest/azalea/struct.ClientBuilder.html
-#[derive(Clone, Debug, Component)]
+#[derive(Clone, Component, Debug)]
pub struct Account {
/// The Minecraft username of the account.
pub username: String,
@@ -269,7 +269,7 @@ impl Account {
}
#[cfg(feature = "online-mode")]
-#[derive(Error, Debug)]
+#[derive(Debug, Error)]
pub enum RequestCertError {
#[error("Failed to fetch certificates")]
FetchCertificates(#[from] FetchCertificatesError),
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 579f5d26..3ba52395 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -562,11 +562,11 @@ pub struct JoinedClientBundle {
/// A marker component for local players that are currently in the
/// `game` state.
-#[derive(Component, Clone, Debug, Default)]
+#[derive(Clone, Component, Debug, Default)]
pub struct InGameState;
/// A marker component for local players that are currently in the
/// `configuration` state.
-#[derive(Component, Clone, Debug, Default)]
+#[derive(Clone, Component, Debug, Default)]
pub struct InConfigState;
pub struct AzaleaPlugin;
diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs
index 4bc69995..4062e32e 100644
--- a/azalea-client/src/local_player.rs
+++ b/azalea-client/src/local_player.rs
@@ -24,7 +24,7 @@ use crate::{ClientInformation, events::Event as AzaleaEvent, player::PlayerInfo}
///
/// [`InstanceContainer`]: azalea_world::InstanceContainer
/// [`InstanceName`]: azalea_world::InstanceName
-#[derive(Component, Clone)]
+#[derive(Clone, Component)]
pub struct InstanceHolder {
/// The partial instance is the world this client currently has loaded.
///
@@ -40,7 +40,7 @@ pub struct InstanceHolder {
/// The gamemode of a local player. For a non-local player, you can look up the
/// player in the [`TabList`].
-#[derive(Component, Clone, Debug, Copy)]
+#[derive(Clone, Component, Copy, Debug)]
pub struct LocalGameMode {
pub current: GameMode,
pub previous: Option<GameMode>,
@@ -55,7 +55,7 @@ impl From<GameMode> for LocalGameMode {
}
/// Level must be 0..=4
-#[derive(Component, Clone, Default, Deref, DerefMut)]
+#[derive(Clone, Component, Default, Deref, DerefMut)]
pub struct PermissionLevel(pub u8);
/// A component that contains a map of player UUIDs to their information in the
@@ -77,10 +77,10 @@ pub struct PermissionLevel(pub u8);
/// was updated.
/// This means you should avoid using `TabList` as a resource unless you know
/// all of your clients will have the same tab list.
-#[derive(Component, Resource, Clone, Debug, Deref, DerefMut, Default)]
+#[derive(Clone, Component, Debug, Default, Deref, DerefMut, Resource)]
pub struct TabList(HashMap<Uuid, PlayerInfo>);
-#[derive(Component, Clone)]
+#[derive(Clone, Component)]
pub struct Hunger {
/// The main hunger bar. This is typically in the range `0..=20`.
pub food: u32,
@@ -147,7 +147,7 @@ impl InstanceHolder {
}
}
-#[derive(Error, Debug)]
+#[derive(Debug, Error)]
pub enum HandlePacketError {
#[error("{0}")]
Poison(String),
diff --git a/azalea-client/src/ping.rs b/azalea-client/src/ping.rs
index 08f909e4..9bdf391e 100644
--- a/azalea-client/src/ping.rs
+++ b/azalea-client/src/ping.rs
@@ -20,7 +20,7 @@ use azalea_protocol::{
};
use thiserror::Error;
-#[derive(Error, Debug)]
+#[derive(Debug, Error)]
pub enum PingError {
#[error("{0}")]
Resolve(#[from] resolve::ResolveError),
diff --git a/azalea-client/src/player.rs b/azalea-client/src/player.rs
index 9a2e7a1c..b1978e7c 100644
--- a/azalea-client/src/player.rs
+++ b/azalea-client/src/player.rs
@@ -13,7 +13,7 @@ use uuid::Uuid;
use crate::packet::game::AddPlayerEvent;
/// A player in the tab list.
-#[derive(Debug, Clone)]
+#[derive(Clone, Debug)]
pub struct PlayerInfo {
/// Information about the player's Minecraft account, including their
/// username.
@@ -38,7 +38,7 @@ pub struct PlayerInfo {
///
/// Note that it's possible for this to be missing in a player if the server
/// never sent the player info for them (though this is uncommon).
-#[derive(Component, Clone, Debug, Deref, DerefMut)]
+#[derive(Clone, Component, Debug, Deref, DerefMut)]
pub struct GameProfileComponent(pub GameProfile);
/// Add a [`GameProfileComponent`] when an [`AddPlayerEvent`] is received.
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)>,
diff --git a/azalea-client/src/plugins/auto_reconnect.rs b/azalea-client/src/plugins/auto_reconnect.rs
index fd24f12c..4851a4e7 100644
--- a/azalea-client/src/plugins/auto_reconnect.rs
+++ b/azalea-client/src/plugins/auto_reconnect.rs
@@ -126,7 +126,7 @@ pub fn rejoin_after_delay(
/// You can also remove this resource from the ECS to disable the default
/// auto-reconnecting behavior. Inserting the resource/component again will not
/// make clients that were already disconnected automatically reconnect.
-#[derive(Resource, Component, Debug, Clone)]
+#[derive(Clone, Component, Debug, Resource)]
pub struct AutoReconnectDelay {
pub delay: Duration,
}
@@ -139,7 +139,7 @@ impl AutoReconnectDelay {
/// This is inserted when we're disconnected and indicates when we'll reconnect.
///
/// This is set based on [`AutoReconnectDelay`].
-#[derive(Component, Debug, Clone)]
+#[derive(Clone, Component, Debug)]
pub struct InternalReconnectAfter {
pub instant: Instant,
}
diff --git a/azalea-client/src/plugins/block_update.rs b/azalea-client/src/plugins/block_update.rs
index 15e885b6..46e6b409 100644
--- a/azalea-client/src/plugins/block_update.rs
+++ b/azalea-client/src/plugins/block_update.rs
@@ -26,7 +26,7 @@ impl Plugin for BlockUpdatePlugin {
/// [`handle_block_update_event`] (`Update`).
///
/// This is a component instead of an ECS event for performance reasons.
-#[derive(Component, Debug, Clone, Default)]
+#[derive(Clone, Component, Debug, Default)]
pub struct QueuedServerBlockUpdates {
pub list: Vec<(BlockPos, BlockState)>,
}
diff --git a/azalea-client/src/plugins/chat/mod.rs b/azalea-client/src/plugins/chat/mod.rs
index 7fd14e26..bd90a8d6 100644
--- a/azalea-client/src/plugins/chat/mod.rs
+++ b/azalea-client/src/plugins/chat/mod.rs
@@ -30,7 +30,7 @@ impl Plugin for ChatPlugin {
}
/// A chat packet, either a system message or a chat message.
-#[derive(Debug, Clone, PartialEq)]
+#[derive(Clone, Debug, PartialEq)]
pub enum ChatPacket {
System(Arc<ClientboundSystemChat>),
Player(Arc<ClientboundPlayerChat>),
@@ -234,7 +234,7 @@ impl Client {
}
/// A client received a chat message packet.
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct ChatReceivedEvent {
pub entity: Entity,
pub packet: ChatPacket,
diff --git a/azalea-client/src/plugins/chunks.rs b/azalea-client/src/plugins/chunks.rs
index 317a36c5..d5014516 100644
--- a/azalea-client/src/plugins/chunks.rs
+++ b/azalea-client/src/plugins/chunks.rs
@@ -47,7 +47,7 @@ pub struct ReceiveChunkEvent {
pub packet: ClientboundLevelChunkWithLight,
}
-#[derive(Component, Clone, Debug)]
+#[derive(Clone, Component, Debug)]
pub struct ChunkBatchInfo {
pub start_time: Instant,
pub aggregated_duration_per_chunk: Duration,
diff --git a/azalea-client/src/plugins/connection.rs b/azalea-client/src/plugins/connection.rs
index dc14545a..70724f4b 100644
--- a/azalea-client/src/plugins/connection.rs
+++ b/azalea-client/src/plugins/connection.rs
@@ -371,7 +371,7 @@ async fn write_task(
trace!("write task is done");
}
-#[derive(Error, Debug)]
+#[derive(Debug, Error)]
pub enum WritePacketError {
#[error("Wrong protocol state: expected {expected:?}, got {got:?}")]
WrongState {
diff --git a/azalea-client/src/plugins/disconnect.rs b/azalea-client/src/plugins/disconnect.rs
index 95d1b5ac..8c5036e1 100644
--- a/azalea-client/src/plugins/disconnect.rs
+++ b/azalea-client/src/plugins/disconnect.rs
@@ -112,7 +112,7 @@ pub fn remove_components_from_disconnected_players(
}
}
-#[derive(Component, Clone, Copy, Debug, Deref)]
+#[derive(Clone, Component, Copy, Debug, Deref)]
pub struct IsConnectionAlive(bool);
fn update_read_packets_task_running_component(
diff --git a/azalea-client/src/plugins/events.rs b/azalea-client/src/plugins/events.rs
index 0bd738c0..c1b77abe 100644
--- a/azalea-client/src/plugins/events.rs
+++ b/azalea-client/src/plugins/events.rs
@@ -50,7 +50,7 @@ use crate::{
///
/// Note: Events are sent before they're processed, so for example game ticks
/// happen at the beginning of a tick before anything has happened.
-#[derive(Debug, Clone)]
+#[derive(Clone, Debug)]
#[non_exhaustive]
pub enum Event {
/// Happens right after the bot switches into the Game state, but before
diff --git a/azalea-client/src/plugins/interact/mod.rs b/azalea-client/src/plugins/interact/mod.rs
index 8269197c..df614b8a 100644
--- a/azalea-client/src/plugins/interact/mod.rs
+++ b/azalea-client/src/plugins/interact/mod.rs
@@ -82,7 +82,7 @@ impl Plugin for InteractPlugin {
}
}
-#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
+#[derive(Clone, Debug, Eq, Hash, PartialEq, SystemSet)]
pub struct UpdateAttributesSystems;
impl Client {
@@ -133,7 +133,7 @@ impl Client {
/// A component that contains information about our local block state
/// predictions.
-#[derive(Component, Clone, Debug, Default)]
+#[derive(Clone, Component, Debug, Default)]
pub struct BlockStatePredictionHandler {
/// The total number of changes that this client has made to blocks.
seq: u32,
@@ -351,7 +351,7 @@ pub fn handle_start_use_item_queued(
/// An ECS `Event` that makes the client tell the server that we right-clicked
/// an entity.
-#[derive(EntityEvent, Clone, Debug)]
+#[derive(Clone, Debug, EntityEvent)]
pub struct EntityInteractEvent {
#[event_target]
pub client: Entity,
@@ -498,7 +498,7 @@ pub fn can_use_game_master_blocks(
///
/// This is purely a visual effect and won't interact with anything in the
/// world.
-#[derive(EntityEvent, Clone, Debug)]
+#[derive(Clone, Debug, EntityEvent)]
pub struct SwingArmEvent {
pub entity: Entity,
}
diff --git a/azalea-client/src/plugins/interact/pick.rs b/azalea-client/src/plugins/interact/pick.rs
index 580bb50c..8ffe47e8 100644
--- a/azalea-client/src/plugins/interact/pick.rs
+++ b/azalea-client/src/plugins/interact/pick.rs
@@ -24,7 +24,7 @@ use derive_more::{Deref, DerefMut};
/// A component that contains the block or entity that the player is currently
/// looking at.
#[doc(alias("looking at", "looking at block", "crosshair"))]
-#[derive(Component, Clone, Debug, Deref, DerefMut)]
+#[derive(Clone, Component, Debug, Deref, DerefMut)]
pub struct HitResultComponent(HitResult);
#[allow(clippy::type_complexity)]
diff --git a/azalea-client/src/plugins/inventory/equipment_effects.rs b/azalea-client/src/plugins/inventory/equipment_effects.rs
index c02f8ad5..47220bf2 100644
--- a/azalea-client/src/plugins/inventory/equipment_effects.rs
+++ b/azalea-client/src/plugins/inventory/equipment_effects.rs
@@ -78,7 +78,7 @@ pub fn collect_equipment_changes(
}
}
-#[derive(EntityEvent, Debug)]
+#[derive(Debug, EntityEvent)]
pub struct EquipmentChangesEvent {
pub entity: Entity,
pub map: HashMap<EquipmentSlot, EquipmentChange>,
diff --git a/azalea-client/src/plugins/inventory/mod.rs b/azalea-client/src/plugins/inventory/mod.rs
index 93be9e96..09c0d78f 100644
--- a/azalea-client/src/plugins/inventory/mod.rs
+++ b/azalea-client/src/plugins/inventory/mod.rs
@@ -53,7 +53,7 @@ impl Plugin for InventoryPlugin {
}
}
-#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
+#[derive(Clone, Debug, Eq, Hash, PartialEq, SystemSet)]
pub struct InventorySystems;
impl Client {
@@ -102,7 +102,7 @@ impl Client {
/// To watch for the menu being closed, you could use
/// [`ClientsideCloseContainerEvent`]. To close it manually, use
/// [`CloseContainerEvent`].
-#[derive(EntityEvent, Debug, Clone)]
+#[derive(Clone, Debug, EntityEvent)]
pub struct MenuOpenedEvent {
pub entity: Entity,
pub window_id: i32,
@@ -162,7 +162,7 @@ fn handle_container_close_event(
///
/// If you want to watch for a container being opened, you should use
/// [`MenuOpenedEvent`].
-#[derive(EntityEvent, Clone)]
+#[derive(Clone, EntityEvent)]
pub struct ClientsideCloseContainerEvent {
pub entity: Entity,
}
@@ -199,7 +199,7 @@ pub fn handle_client_side_close_container_trigger(
inventory.container_menu_title = None;
}
-#[derive(EntityEvent, Debug)]
+#[derive(Debug, EntityEvent)]
pub struct ContainerClickEvent {
pub entity: Entity,
pub window_id: i32,
diff --git a/azalea-client/src/plugins/join.rs b/azalea-client/src/plugins/join.rs
index f1e27165..b1759992 100644
--- a/azalea-client/src/plugins/join.rs
+++ b/azalea-client/src/plugins/join.rs
@@ -47,7 +47,7 @@ impl Plugin for JoinPlugin {
///
/// This won't do anything if a client with the Account UUID is already
/// connected to the server.
-#[derive(Message, Debug)]
+#[derive(Debug, Message)]
pub struct StartJoinServerEvent {
pub account: Account,
pub connect_opts: ConnectOpts,
@@ -61,7 +61,7 @@ pub struct StartJoinServerEvent {
///
/// These are persisted on reconnects. This is inserted as a component on
/// clients to make auto-reconnecting work.
-#[derive(Debug, Clone, Component)]
+#[derive(Clone, Component, Debug)]
pub struct ConnectOpts {
pub address: ResolvedAddr,
/// The SOCKS5 proxy used for connecting to the Minecraft server.
diff --git a/azalea-client/src/plugins/mining.rs b/azalea-client/src/plugins/mining.rs
index 6f00c054..56136362 100644
--- a/azalea-client/src/plugins/mining.rs
+++ b/azalea-client/src/plugins/mining.rs
@@ -68,7 +68,7 @@ impl Plugin for MiningPlugin {
}
/// The Bevy system set for things related to mining.
-#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
+#[derive(Clone, Debug, Eq, Hash, PartialEq, SystemSet)]
pub struct MiningSystems;
impl Client {
@@ -155,7 +155,7 @@ fn handle_auto_mine(
/// Information about the block we're currently mining.
///
/// This is only present if we're currently mining a block.
-#[derive(Component, Debug, Clone)]
+#[derive(Clone, Component, Debug)]
pub struct Mining {
pub pos: BlockPos,
pub dir: Direction,
@@ -167,7 +167,7 @@ pub struct Mining {
///
/// If we're looking at the block then the correct direction will be used,
/// otherwise it'll be [`Direction::Down`].
-#[derive(Message, Debug)]
+#[derive(Debug, Message)]
pub struct StartMiningBlockEvent {
pub entity: Entity,
pub position: BlockPos,
@@ -230,7 +230,7 @@ fn handle_start_mining_block_event(
}
/// Present on entities when they're going to start mining a block next tick.
-#[derive(Component, Debug, Clone)]
+#[derive(Clone, Component, Debug)]
pub struct MiningQueued {
pub position: BlockPos,
pub direction: Direction,
@@ -443,7 +443,7 @@ fn is_same_mining_target(
}
/// A component bundle for players that can mine blocks.
-#[derive(Bundle, Default, Clone)]
+#[derive(Bundle, Clone, Default)]
pub struct MineBundle {
pub delay: MineDelay,
pub progress: MineProgress,
@@ -453,13 +453,13 @@ pub struct MineBundle {
}
/// A component that counts down until we start mining the next block.
-#[derive(Component, Debug, Default, Deref, DerefMut, Clone)]
+#[derive(Clone, Component, Debug, Default, Deref, DerefMut)]
pub struct MineDelay(pub u32);
/// A component that stores the progress of the current mining operation.
///
/// This is a value between 0 and 1.
-#[derive(Component, Debug, Default, Deref, DerefMut, Clone)]
+#[derive(Clone, Component, Debug, Default, Deref, DerefMut)]
pub struct MineProgress(pub f32);
impl MineProgress {
@@ -476,16 +476,16 @@ impl MineProgress {
/// block for.
///
/// This is a float despite the fact that it should only ever be a round number.
-#[derive(Component, Clone, Debug, Default, Deref, DerefMut)]
+#[derive(Clone, Component, Debug, Default, Deref, DerefMut)]
pub struct MineTicks(pub f32);
/// A component that stores the position of the block we're currently mining.
-#[derive(Component, Clone, Debug, Default, Deref, DerefMut)]
+#[derive(Clone, Component, Debug, Default, Deref, DerefMut)]
pub struct MineBlockPos(pub Option<BlockPos>);
/// A component that contains the item we're currently using to mine, or
/// [`ItemStack::Empty`] if nothing is being mined.
-#[derive(Component, Clone, Debug, Default, Deref, DerefMut)]
+#[derive(Clone, Component, Debug, Default, Deref, DerefMut)]
pub struct MineItem(pub ItemStack);
/// A trigger that's sent when we completed mining a block.
diff --git a/azalea-client/src/plugins/movement.rs b/azalea-client/src/plugins/movement.rs
index 703b5557..15d4a468 100644
--- a/azalea-client/src/plugins/movement.rs
+++ b/azalea-client/src/plugins/movement.rs
@@ -74,7 +74,7 @@ impl Plugin for MovementPlugin {
}
}
-#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
+#[derive(Clone, Debug, Eq, Hash, PartialEq, SystemSet)]
pub struct MoveEventsSystems;
impl Client {
@@ -128,7 +128,7 @@ impl Client {
/// A component that contains the look direction that was last sent over the
/// network.
-#[derive(Debug, Component, Clone, Default)]
+#[derive(Clone, Component, Debug, Default)]
pub struct LastSentLookDirection {
pub x_rot: f32,
pub y_rot: f32,
@@ -242,7 +242,7 @@ pub fn send_position(
}
}
-#[derive(Debug, Default, Component, Clone, PartialEq, Eq)]
+#[derive(Clone, Component, Debug, Default, Eq, PartialEq)]
pub struct LastSentInput(pub ServerboundPlayerInput);
pub fn send_player_input_packet(
mut query: Query<(Entity, &PhysicsState, &Jumping, Option<&LastSentInput>)>,
@@ -571,7 +571,7 @@ impl Client {
/// This does not get sent for non-local entities.
///
/// To stop walking or sprinting, send this event with `WalkDirection::None`.
-#[derive(Message, Debug)]
+#[derive(Debug, Message)]
pub struct StartWalkEvent {
pub entity: Entity,
pub direction: WalkDirection,
diff --git a/azalea-client/src/plugins/packet/config/events.rs b/azalea-client/src/plugins/packet/config/events.rs
index 92df8d74..9fcce3b5 100644
--- a/azalea-client/src/plugins/packet/config/events.rs
+++ b/azalea-client/src/plugins/packet/config/events.rs
@@ -9,7 +9,7 @@ use tracing::{debug, error};
use crate::{InConfigState, connection::RawConnection};
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct ReceiveConfigPacketEvent {
/// The client entity that received the packet.
pub entity: Entity,
@@ -19,7 +19,7 @@ pub struct ReceiveConfigPacketEvent {
/// An event for sending a packet to the server while we're in the
/// `configuration` state.
-#[derive(EntityEvent, Clone)]
+#[derive(Clone, EntityEvent)]
pub struct SendConfigPacketEvent {
#[event_target]
pub sent_by: Entity,
@@ -58,7 +58,7 @@ pub fn handle_outgoing_packets_observer(
///
/// [`ClientboundPing`]: azalea_protocol::packets::config::ClientboundPing
/// [`GamePingEvent`]: crate::packet::game::GamePingEvent
-#[derive(Event, Debug, Clone)]
+#[derive(Clone, Debug, Event)]
pub struct ConfigPingEvent {
pub entity: Entity,
pub packet: azalea_protocol::packets::config::ClientboundPing,
diff --git a/azalea-client/src/plugins/packet/game/events.rs b/azalea-client/src/plugins/packet/game/events.rs
index 9ce4c252..535bd519 100644
--- a/azalea-client/src/plugins/packet/game/events.rs
+++ b/azalea-client/src/plugins/packet/game/events.rs
@@ -31,7 +31,7 @@ use crate::{client::InGameState, connection::RawConnection, player::PlayerInfo};
/// }
/// }
/// ```
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct ReceiveGamePacketEvent {
/// The client entity that received the packet.
pub entity: Entity,
@@ -40,7 +40,7 @@ pub struct ReceiveGamePacketEvent {
}
/// An event for sending a packet to the server while we're in the `game` state.
-#[derive(EntityEvent, Clone, Debug)]
+#[derive(Clone, Debug, EntityEvent)]
pub struct SendGamePacketEvent {
#[event_target]
pub sent_by: Entity,
@@ -79,7 +79,7 @@ pub fn handle_outgoing_packets_observer(
/// A player joined the game (or more specifically, was added to the tab
/// list of a local player).
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct AddPlayerEvent {
/// The local player entity that received this event.
pub entity: Entity,
@@ -87,7 +87,7 @@ pub struct AddPlayerEvent {
}
/// A player left the game (or maybe is still in the game and was just
/// removed from the tab list of a local player).
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct RemovePlayerEvent {
/// The local player entity that received this event.
pub entity: Entity,
@@ -95,7 +95,7 @@ pub struct RemovePlayerEvent {
}
/// A player was updated in the tab list of a local player (gamemode, display
/// name, or latency changed).
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct UpdatePlayerEvent {
/// The local player entity that received this event.
pub entity: Entity,
@@ -106,7 +106,7 @@ pub struct UpdatePlayerEvent {
///
/// If it's a local player and there's a reason in the death screen, the
/// [`ClientboundPlayerCombatKill`] will be included.
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct DeathEvent {
pub entity: Entity,
pub packet: Option<ClientboundPlayerCombatKill>,
@@ -114,7 +114,7 @@ pub struct DeathEvent {
/// A KeepAlive packet is sent from the server to verify that the client is
/// still connected.
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct KeepAliveEvent {
pub entity: Entity,
/// The ID of the keepalive.
@@ -124,7 +124,7 @@ pub struct KeepAliveEvent {
pub id: u64,
}
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct ResourcePackEvent {
pub entity: Entity,
/// The random ID for this request to download the resource pack.
@@ -142,7 +142,7 @@ pub struct ResourcePackEvent {
///
/// Since the instance is given to you as a weak reference, it won't be able to
/// be `upgrade`d if all local players leave it.
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct InstanceLoadedEvent {
pub entity: Entity,
pub name: Identifier,
@@ -156,7 +156,7 @@ pub struct InstanceLoadedEvent {
///
/// [`ClientboundPing`]: azalea_protocol::packets::game::ClientboundPing
/// [`ConfigPingEvent`]: crate::packet::config::ConfigPingEvent
-#[derive(EntityEvent, Debug, Clone)]
+#[derive(Clone, Debug, EntityEvent)]
pub struct GamePingEvent {
pub entity: Entity,
pub packet: azalea_protocol::packets::game::ClientboundPing,
diff --git a/azalea-client/src/plugins/packet/login/events.rs b/azalea-client/src/plugins/packet/login/events.rs
index f50c1423..52e696cb 100644
--- a/azalea-client/src/plugins/packet/login/events.rs
+++ b/azalea-client/src/plugins/packet/login/events.rs
@@ -12,7 +12,7 @@ use tracing::{debug, error};
use super::InLoginState;
use crate::{Account, connection::RawConnection};
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct ReceiveLoginPacketEvent {
/// The client entity that received the packet.
pub entity: Entity,
@@ -20,14 +20,14 @@ pub struct ReceiveLoginPacketEvent {
pub packet: Arc<ClientboundLoginPacket>,
}
-#[derive(EntityEvent, Debug, Clone)]
+#[derive(Clone, Debug, EntityEvent)]
pub struct ReceiveHelloEvent {
pub entity: Entity,
pub account: Account,
pub packet: ClientboundHello,
}
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct ReceiveCustomQueryEvent {
/// The client entity that received the packet.
pub entity: Entity,
@@ -41,7 +41,7 @@ pub struct ReceiveCustomQueryEvent {
}
/// Event for sending a login packet to the server.
-#[derive(EntityEvent, Debug, Clone)]
+#[derive(Clone, Debug, EntityEvent)]
pub struct SendLoginPacketEvent {
#[event_target]
pub sent_by: Entity,
diff --git a/azalea-client/src/plugins/packet/login/mod.rs b/azalea-client/src/plugins/packet/login/mod.rs
index 63226124..8fe1e22a 100644
--- a/azalea-client/src/plugins/packet/login/mod.rs
+++ b/azalea-client/src/plugins/packet/login/mod.rs
@@ -41,7 +41,7 @@ pub fn process_packet(ecs: &mut World, player: Entity, packet: &ClientboundLogin
/// A marker component for local players that are currently in the
/// `login` state.
-#[derive(Component, Clone, Debug)]
+#[derive(Clone, Component, Debug)]
pub struct InLoginState;
pub struct LoginPacketHandler<'a> {
diff --git a/azalea-client/src/plugins/respawn.rs b/azalea-client/src/plugins/respawn.rs
index 7c16b0e2..60d3594d 100644
--- a/azalea-client/src/plugins/respawn.rs
+++ b/azalea-client/src/plugins/respawn.rs
@@ -5,7 +5,7 @@ use bevy_ecs::prelude::*;
use crate::packet::game::SendGamePacketEvent;
/// Tell the server that we're respawning.
-#[derive(Message, Debug, Clone)]
+#[derive(Clone, Debug, Message)]
pub struct PerformRespawnEvent {
pub entity: Entity,
}
diff --git a/azalea-client/src/plugins/tick_broadcast.rs b/azalea-client/src/plugins/tick_broadcast.rs
index b55b9921..e51716cc 100644
--- a/azalea-client/src/plugins/tick_broadcast.rs
+++ b/azalea-client/src/plugins/tick_broadcast.rs
@@ -22,13 +22,13 @@ use tokio::sync::broadcast;
/// }
/// # }
/// ```
-#[derive(Resource, Deref)]
+#[derive(Deref, Resource)]
pub struct TickBroadcast(broadcast::Sender<()>);
/// A resource that contains a [`broadcast::Sender`] that will be sent every
/// Azalea ECS Update.
///
/// Also see [`TickBroadcast`].
-#[derive(Resource, Deref)]
+#[derive(Deref, Resource)]
pub struct UpdateBroadcast(broadcast::Sender<()>);
pub fn send_tick_broadcast(tick_broadcast: ResMut<TickBroadcast>) {
diff --git a/azalea-client/src/plugins/tick_counter.rs b/azalea-client/src/plugins/tick_counter.rs
index 43100bba..2f4086a0 100644
--- a/azalea-client/src/plugins/tick_counter.rs
+++ b/azalea-client/src/plugins/tick_counter.rs
@@ -8,7 +8,7 @@ use crate::{mining::MiningSystems, movement::send_position, tick_broadcast::send
/// Counts the number of game ticks elapsed on the **local client** since the
/// `login` packet was received.
-#[derive(Component, Clone, Debug, Default, Eq, PartialEq)]
+#[derive(Clone, Component, Debug, Default, Eq, PartialEq)]
pub struct TicksConnected(pub u64);
/// Inserts the counter-increment system into the `GameTick` schedule **before**