diff --git a/pumpkin-protocol/src/bytebuf/serializer.rs b/pumpkin-protocol/src/bytebuf/serializer.rs index 42e83edb6..025bad91b 100644 --- a/pumpkin-protocol/src/bytebuf/serializer.rs +++ b/pumpkin-protocol/src/bytebuf/serializer.rs @@ -5,7 +5,6 @@ use thiserror::Error; use super::ByteBuffer; - pub struct Serializer { output: ByteBuffer, } diff --git a/pumpkin-protocol/src/client/config/c_cookie_request.rs b/pumpkin-protocol/src/client/config/c_cookie_request.rs index 52603c657..6926785c6 100644 --- a/pumpkin-protocol/src/client/config/c_cookie_request.rs +++ b/pumpkin-protocol/src/client/config/c_cookie_request.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, Identifier, VarInt, -}; +use crate::Identifier; #[derive(serde::Serialize)] #[packet(0x00)] diff --git a/pumpkin-protocol/src/client/config/c_finish_config.rs b/pumpkin-protocol/src/client/config/c_finish_config.rs index 867feaf8d..d3ea395e6 100644 --- a/pumpkin-protocol/src/client/config/c_finish_config.rs +++ b/pumpkin-protocol/src/client/config/c_finish_config.rs @@ -1,7 +1,5 @@ use pumpkin_macros::packet; -use crate::{bytebuf::packet_id::Packet, VarInt}; - #[derive(serde::Serialize)] #[packet(0x03)] pub struct CFinishConfig {} diff --git a/pumpkin-protocol/src/client/config/c_known_packs.rs b/pumpkin-protocol/src/client/config/c_known_packs.rs index a30651bc4..8f598fb7e 100644 --- a/pumpkin-protocol/src/client/config/c_known_packs.rs +++ b/pumpkin-protocol/src/client/config/c_known_packs.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, KnownPack, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket, KnownPack}; #[packet(0x0E)] pub struct CKnownPacks<'a> { diff --git a/pumpkin-protocol/src/client/config/c_plugin_message.rs b/pumpkin-protocol/src/client/config/c_plugin_message.rs index 1adf0bc68..9eb3d6757 100644 --- a/pumpkin-protocol/src/client/config/c_plugin_message.rs +++ b/pumpkin-protocol/src/client/config/c_plugin_message.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket}; #[packet(0x01)] pub struct CPluginMessage<'a> { diff --git a/pumpkin-protocol/src/client/config/c_registry_data.rs b/pumpkin-protocol/src/client/config/c_registry_data.rs index 502622004..5d11ce474 100644 --- a/pumpkin-protocol/src/client/config/c_registry_data.rs +++ b/pumpkin-protocol/src/client/config/c_registry_data.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket}; #[packet(0x07)] pub struct CRegistryData<'a> { diff --git a/pumpkin-protocol/src/client/login/c_encryption_request.rs b/pumpkin-protocol/src/client/login/c_encryption_request.rs index 408b1316a..41bbad1b2 100644 --- a/pumpkin-protocol/src/client/login/c_encryption_request.rs +++ b/pumpkin-protocol/src/client/login/c_encryption_request.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket, VarInt}; #[packet(0x01)] pub struct CEncryptionRequest<'a> { diff --git a/pumpkin-protocol/src/client/login/c_login_disconnect.rs b/pumpkin-protocol/src/client/login/c_login_disconnect.rs index 0520a72c4..e321faf1e 100644 --- a/pumpkin-protocol/src/client/login/c_login_disconnect.rs +++ b/pumpkin-protocol/src/client/login/c_login_disconnect.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket}; #[packet(0x00)] pub struct CLoginDisconnect<'a> { diff --git a/pumpkin-protocol/src/client/login/c_login_success.rs b/pumpkin-protocol/src/client/login/c_login_success.rs index c1de8d8ba..265527802 100644 --- a/pumpkin-protocol/src/client/login/c_login_success.rs +++ b/pumpkin-protocol/src/client/login/c_login_success.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, Property, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket, Property}; #[packet(0x02)] pub struct CLoginSuccess<'a> { diff --git a/pumpkin-protocol/src/client/login/c_set_compression.rs b/pumpkin-protocol/src/client/login/c_set_compression.rs index 47f1957ae..2d2978d38 100644 --- a/pumpkin-protocol/src/client/login/c_set_compression.rs +++ b/pumpkin-protocol/src/client/login/c_set_compression.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket, VarInt}; #[packet(0x03)] pub struct CSetCompression { diff --git a/pumpkin-protocol/src/client/play/c_change_difficulty.rs b/pumpkin-protocol/src/client/play/c_change_difficulty.rs index 6e1d7bc0c..86bfe2fa8 100644 --- a/pumpkin-protocol/src/client/play/c_change_difficulty.rs +++ b/pumpkin-protocol/src/client/play/c_change_difficulty.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket}; #[packet(0x0B)] pub struct CChangeDifficulty { diff --git a/pumpkin-protocol/src/client/play/c_chunk_data_update_light.rs b/pumpkin-protocol/src/client/play/c_chunk_data_update_light.rs index 91b059259..c9063a047 100644 --- a/pumpkin-protocol/src/client/play/c_chunk_data_update_light.rs +++ b/pumpkin-protocol/src/client/play/c_chunk_data_update_light.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - BitSet, ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, BitSet, ClientPacket, VarInt}; #[packet(0x27)] pub struct CChunkDataUpdateLight { diff --git a/pumpkin-protocol/src/client/play/c_game_event.rs b/pumpkin-protocol/src/client/play/c_game_event.rs index 0d78f59fb..2f52dd51f 100644 --- a/pumpkin-protocol/src/client/play/c_game_event.rs +++ b/pumpkin-protocol/src/client/play/c_game_event.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket}; #[packet(0x22)] pub struct CGameEvent { diff --git a/pumpkin-protocol/src/client/play/c_login.rs b/pumpkin-protocol/src/client/play/c_login.rs index 54e92c03f..ce7b4763c 100644 --- a/pumpkin-protocol/src/client/play/c_login.rs +++ b/pumpkin-protocol/src/client/play/c_login.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket, VarInt}; #[packet(0x2B)] pub struct CLogin { diff --git a/pumpkin-protocol/src/client/play/c_play_disconnect.rs b/pumpkin-protocol/src/client/play/c_play_disconnect.rs index a8172d959..f618d2ec0 100644 --- a/pumpkin-protocol/src/client/play/c_play_disconnect.rs +++ b/pumpkin-protocol/src/client/play/c_play_disconnect.rs @@ -1,10 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - text::TextComponent, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, text::TextComponent, ClientPacket}; #[packet(0x1D)] pub struct CPlayDisconnect { diff --git a/pumpkin-protocol/src/client/play/c_player_abilities.rs b/pumpkin-protocol/src/client/play/c_player_abilities.rs index 901a57279..65c4cbd08 100644 --- a/pumpkin-protocol/src/client/play/c_player_abilities.rs +++ b/pumpkin-protocol/src/client/play/c_player_abilities.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket}; #[packet(0x38)] pub struct CPlayerAbilities { diff --git a/pumpkin-protocol/src/client/play/c_player_info_update.rs b/pumpkin-protocol/src/client/play/c_player_info_update.rs index b8b6d44f7..f3ad678a7 100644 --- a/pumpkin-protocol/src/client/play/c_player_info_update.rs +++ b/pumpkin-protocol/src/client/play/c_player_info_update.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, Property, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket, Property}; use super::PlayerAction; diff --git a/pumpkin-protocol/src/client/play/c_set_held_item.rs b/pumpkin-protocol/src/client/play/c_set_held_item.rs index 16f59b551..979284602 100644 --- a/pumpkin-protocol/src/client/play/c_set_held_item.rs +++ b/pumpkin-protocol/src/client/play/c_set_held_item.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket}; #[packet(0x53)] pub struct CSetHeldItem { diff --git a/pumpkin-protocol/src/client/play/c_sync_player_position.rs b/pumpkin-protocol/src/client/play/c_sync_player_position.rs index 137476779..32bfad268 100644 --- a/pumpkin-protocol/src/client/play/c_sync_player_position.rs +++ b/pumpkin-protocol/src/client/play/c_sync_player_position.rs @@ -1,9 +1,6 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; +use crate::{bytebuf::ByteBuffer, ClientPacket, VarInt}; #[packet(0x40)] pub struct CSyncPlayerPostion { diff --git a/pumpkin-protocol/src/client/play/c_system_chat_message.rs b/pumpkin-protocol/src/client/play/c_system_chat_message.rs index c1d694603..2189eeb18 100644 --- a/pumpkin-protocol/src/client/play/c_system_chat_message.rs +++ b/pumpkin-protocol/src/client/play/c_system_chat_message.rs @@ -1,23 +1,22 @@ use pumpkin_macros::packet; -use crate::{bytebuf::ByteBuffer, text::TextComponent, ClientPacket, VarInt}; - +use crate::{bytebuf::ByteBuffer, text::TextComponent, ClientPacket}; #[packet(0x6C)] pub struct CSystemChatMessge { - content: TextComponent, - overlay: bool, + content: TextComponent, + overlay: bool, } impl CSystemChatMessge { - pub fn new(content: TextComponent, overlay: bool) -> Self { - Self { content, overlay } - } + pub fn new(content: TextComponent, overlay: bool) -> Self { + Self { content, overlay } + } } impl ClientPacket for CSystemChatMessge { - fn write(&self, bytebuf: &mut ByteBuffer) { - bytebuf.put_slice(&self.content.encode()); - bytebuf.put_bool(self.overlay); - } + fn write(&self, bytebuf: &mut ByteBuffer) { + bytebuf.put_slice(&self.content.encode()); + bytebuf.put_bool(self.overlay); + } } diff --git a/pumpkin-protocol/src/client/status/c_ping_response.rs b/pumpkin-protocol/src/client/status/c_ping_response.rs index 2aa7e88c4..333339a9b 100644 --- a/pumpkin-protocol/src/client/status/c_ping_response.rs +++ b/pumpkin-protocol/src/client/status/c_ping_response.rs @@ -1,7 +1,5 @@ use pumpkin_macros::packet; -use crate::{bytebuf::packet_id::Packet, VarInt}; - #[derive(serde::Serialize)] #[packet(0x01)] pub struct CPingResponse { diff --git a/pumpkin-protocol/src/client/status/c_status_response.rs b/pumpkin-protocol/src/client/status/c_status_response.rs index 293f42524..5f82c33e1 100644 --- a/pumpkin-protocol/src/client/status/c_status_response.rs +++ b/pumpkin-protocol/src/client/status/c_status_response.rs @@ -1,10 +1,5 @@ use pumpkin_macros::packet; -use crate::{ - bytebuf::{packet_id::Packet, ByteBuffer}, - ClientPacket, VarInt, -}; - #[derive(serde::Serialize)] #[packet(0x00)] pub struct CStatusResponse<'a> { @@ -16,4 +11,3 @@ impl<'a> CStatusResponse<'a> { Self { json_response } } } -