From f364ad6b210f93f53b6ee8f73c259622e9f37421 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 28 Nov 2024 20:33:39 +0000 Subject: switch some packet structs to unit structs --- azalea-protocol/src/packets/game/c_chunk_batch_start.rs | 2 +- azalea-protocol/src/packets/game/c_player_chat.rs | 10 ---------- azalea-protocol/src/packets/game/c_player_combat_enter.rs | 2 +- azalea-protocol/src/packets/game/c_start_configuration.rs | 2 +- azalea-protocol/src/packets/game/s_client_tick_end.rs | 2 +- .../src/packets/game/s_configuration_acknowledged.rs | 2 +- 6 files changed, 5 insertions(+), 15 deletions(-) (limited to 'azalea-protocol/src/packets/game') diff --git a/azalea-protocol/src/packets/game/c_chunk_batch_start.rs b/azalea-protocol/src/packets/game/c_chunk_batch_start.rs index 8b0555dc..b5cd1ba2 100644 --- a/azalea-protocol/src/packets/game/c_chunk_batch_start.rs +++ b/azalea-protocol/src/packets/game/c_chunk_batch_start.rs @@ -2,4 +2,4 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] -pub struct ClientboundChunkBatchStart {} +pub struct ClientboundChunkBatchStart; diff --git a/azalea-protocol/src/packets/game/c_player_chat.rs b/azalea-protocol/src/packets/game/c_player_chat.rs index 0e9960f2..3628fa95 100644 --- a/azalea-protocol/src/packets/game/c_player_chat.rs +++ b/azalea-protocol/src/packets/game/c_player_chat.rs @@ -88,16 +88,6 @@ pub struct MessageSignatureCache { pub entries: Vec>, } -// impl MessageSignatureCache { -// pub fn unpacker(&self) -> impl Fn(u32) -> Option { - -// } -// } - -// impl PackedSignedMessageBody { -// pub fn unpack(&self, unpacker: impl Fn(u32) -> Option) -// {} } - impl ClientboundPlayerChat { /// Returns the content of the message. If you want to get the FormattedText /// for the whole message including the sender part, use diff --git a/azalea-protocol/src/packets/game/c_player_combat_enter.rs b/azalea-protocol/src/packets/game/c_player_combat_enter.rs index 8c344b49..ee58e277 100755 --- a/azalea-protocol/src/packets/game/c_player_combat_enter.rs +++ b/azalea-protocol/src/packets/game/c_player_combat_enter.rs @@ -3,4 +3,4 @@ use azalea_protocol_macros::ClientboundGamePacket; /// Unused in vanilla. #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerCombatEnter {} +pub struct ClientboundPlayerCombatEnter; diff --git a/azalea-protocol/src/packets/game/c_start_configuration.rs b/azalea-protocol/src/packets/game/c_start_configuration.rs index 6955b70d..d1c60d5e 100644 --- a/azalea-protocol/src/packets/game/c_start_configuration.rs +++ b/azalea-protocol/src/packets/game/c_start_configuration.rs @@ -2,4 +2,4 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] -pub struct ClientboundStartConfiguration {} +pub struct ClientboundStartConfiguration; diff --git a/azalea-protocol/src/packets/game/s_client_tick_end.rs b/azalea-protocol/src/packets/game/s_client_tick_end.rs index d8d93049..221525ec 100644 --- a/azalea-protocol/src/packets/game/s_client_tick_end.rs +++ b/azalea-protocol/src/packets/game/s_client_tick_end.rs @@ -2,4 +2,4 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] -pub struct ServerboundClientTickEnd {} +pub struct ServerboundClientTickEnd; diff --git a/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs b/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs index 58e27abb..3e137494 100644 --- a/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs +++ b/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs @@ -2,4 +2,4 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] -pub struct ServerboundConfigurationAcknowledged {} +pub struct ServerboundConfigurationAcknowledged; -- cgit v1.2.3