aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/packet
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/plugins/packet
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/plugins/packet')
-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
4 files changed, 18 insertions, 18 deletions
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> {