aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/game')
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_award_stats_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_boss_event_packet.rs5
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs6
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_commands_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_delete_chat_packet.rs3
-rw-r--r--azalea-protocol/src/packets/game/clientbound_disguised_chat_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_login_packet.rs4
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_open_book_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs3
-rw-r--r--azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs3
-rw-r--r--azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs9
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_set_player_team_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_stop_sound_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs8
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_update_tags_packet.rs7
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_chat_command_signed_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_container_click_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_interact_packet.rs6
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs6
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_seen_advancements_packet.rs6
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_set_command_block_packet.rs6
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_set_jigsaw_block_packet.rs10
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_set_structure_block_packet.rs6
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_swing_packet.rs3
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_use_item_on_packet.rs6
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_use_item_packet.rs3
27 files changed, 81 insertions, 46 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_award_stats_packet.rs b/azalea-protocol/src/packets/game/clientbound_award_stats_packet.rs
index aaec1849..32e2c8aa 100755
--- a/azalea-protocol/src/packets/game/clientbound_award_stats_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_award_stats_packet.rs
@@ -1,6 +1,7 @@
+use std::collections::HashMap;
+
use azalea_buf::McBuf;
use azalea_protocol_macros::ClientboundGamePacket;
-use std::collections::HashMap;
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundAwardStatsPacket {
diff --git a/azalea-protocol/src/packets/game/clientbound_boss_event_packet.rs b/azalea-protocol/src/packets/game/clientbound_boss_event_packet.rs
index 16fb6f61..65240edf 100755
--- a/azalea-protocol/src/packets/game/clientbound_boss_event_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_boss_event_packet.rs
@@ -1,11 +1,12 @@
+use std::io::Cursor;
+use std::io::Write;
+
use azalea_buf::{
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
};
use azalea_chat::FormattedText;
use azalea_core::bitset::FixedBitSet;
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::Cursor;
-use std::io::Write;
use uuid::Uuid;
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
diff --git a/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs b/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs
index 13887331..c9752ee9 100755
--- a/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs
@@ -11,10 +11,12 @@ pub struct ClientboundCommandSuggestionsPacket {
#[cfg(test)]
mod tests {
- use super::*;
+ use std::io::Cursor;
+
use azalea_brigadier::{context::StringRange, suggestion::Suggestion};
use azalea_buf::{McBufReadable, McBufWritable};
- use std::io::Cursor;
+
+ use super::*;
#[test]
fn test_suggestions() {
diff --git a/azalea-protocol/src/packets/game/clientbound_commands_packet.rs b/azalea-protocol/src/packets/game/clientbound_commands_packet.rs
index 822f62df..10055e37 100755
--- a/azalea-protocol/src/packets/game/clientbound_commands_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_commands_packet.rs
@@ -1,9 +1,10 @@
+use std::io::{Cursor, Write};
+
use azalea_buf::{
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
};
use azalea_core::{bitset::FixedBitSet, resource_location::ResourceLocation};
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::{Cursor, Write};
use tracing::warn;
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
diff --git a/azalea-protocol/src/packets/game/clientbound_delete_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_delete_chat_packet.rs
index b8377afe..eef9b561 100755
--- a/azalea-protocol/src/packets/game/clientbound_delete_chat_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_delete_chat_packet.rs
@@ -1,7 +1,8 @@
-use super::clientbound_player_chat_packet::PackedMessageSignature;
use azalea_buf::McBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use super::clientbound_player_chat_packet::PackedMessageSignature;
+
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundDeleteChatPacket {
pub signature: PackedMessageSignature,
diff --git a/azalea-protocol/src/packets/game/clientbound_disguised_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_disguised_chat_packet.rs
index e1ccff7e..24e1a992 100644
--- a/azalea-protocol/src/packets/game/clientbound_disguised_chat_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_disguised_chat_packet.rs
@@ -1,4 +1,3 @@
-use super::clientbound_player_chat_packet::ChatTypeBound;
use azalea_buf::McBuf;
use azalea_chat::{
translatable_component::{StringOrComponent, TranslatableComponent},
@@ -6,6 +5,8 @@ use azalea_chat::{
};
use azalea_protocol_macros::ClientboundGamePacket;
+use super::clientbound_player_chat_packet::ChatTypeBound;
+
// A disguised chat packet is basically the same as a normal
// [`ClientboundPlayerChatPacket`], except that it doesn't have any of the chat
// signing things. Vanilla servers use this when messages are sent from the
diff --git a/azalea-protocol/src/packets/game/clientbound_login_packet.rs b/azalea-protocol/src/packets/game/clientbound_login_packet.rs
index 20ed30f0..234439d5 100755
--- a/azalea-protocol/src/packets/game/clientbound_login_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_login_packet.rs
@@ -1,9 +1,9 @@
-use crate::packets::common::CommonPlayerSpawnInfo;
-
use azalea_buf::McBuf;
use azalea_core::resource_location::ResourceLocation;
use azalea_protocol_macros::ClientboundGamePacket;
+use crate::packets::common::CommonPlayerSpawnInfo;
+
/// The first packet sent by the server to the client after login.
///
/// This packet contains information about the state of the player, the
diff --git a/azalea-protocol/src/packets/game/clientbound_open_book_packet.rs b/azalea-protocol/src/packets/game/clientbound_open_book_packet.rs
index bf27d4e0..1b450b80 100755
--- a/azalea-protocol/src/packets/game/clientbound_open_book_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_open_book_packet.rs
@@ -1,7 +1,8 @@
-use super::serverbound_interact_packet::InteractionHand;
use azalea_buf::McBuf;
use azalea_protocol_macros::ClientboundGamePacket;
+use super::serverbound_interact_packet::InteractionHand;
+
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundOpenBookPacket {
pub hand: InteractionHand,
diff --git a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs
index edb5f949..48c8b41a 100755
--- a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs
@@ -1,8 +1,9 @@
+use std::io::{Cursor, Write};
+
use azalea_buf::{BufReadError, McBuf};
use azalea_buf::{McBufReadable, McBufWritable};
use azalea_core::bitset::FixedBitSet;
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::{Cursor, Write};
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundPlayerAbilitiesPacket {
diff --git a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs
index 31f18dde..9cd20efc 100644
--- a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs
@@ -1,3 +1,5 @@
+use std::io::{Cursor, Write};
+
use azalea_buf::{
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
};
@@ -8,7 +10,6 @@ use azalea_chat::{
use azalea_core::bitset::BitSet;
use azalea_crypto::MessageSignature;
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::{Cursor, Write};
use uuid::Uuid;
#[derive(Clone, Debug, McBuf, ClientboundGamePacket, PartialEq)]
diff --git a/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs
index 2024f082..2b286e64 100644
--- a/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs
@@ -1,3 +1,8 @@
+use std::{
+ collections::HashMap,
+ io::{Cursor, Write},
+};
+
use azalea_auth::game_profile::{GameProfile, ProfilePropertyValue};
use azalea_buf::{
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
@@ -5,10 +10,6 @@ use azalea_buf::{
use azalea_chat::FormattedText;
use azalea_core::{bitset::FixedBitSet, game_type::GameMode};
use azalea_protocol_macros::ClientboundGamePacket;
-use std::{
- collections::HashMap,
- io::{Cursor, Write},
-};
use uuid::Uuid;
use super::serverbound_chat_session_update_packet::RemoteChatSessionData;
diff --git a/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs
index 00f3980a..165d05db 100755
--- a/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs
@@ -1,8 +1,9 @@
+use std::io::Cursor;
+
use azalea_buf::{BufReadError, McBuf};
use azalea_buf::{McBufReadable, McBufWritable};
use azalea_inventory::ItemSlot;
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::Cursor;
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundSetEquipmentPacket {
diff --git a/azalea-protocol/src/packets/game/clientbound_set_player_team_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_player_team_packet.rs
index 1a09aeb5..724b86aa 100755
--- a/azalea-protocol/src/packets/game/clientbound_set_player_team_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_set_player_team_packet.rs
@@ -1,7 +1,8 @@
+use std::io::{Cursor, Write};
+
use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable};
use azalea_chat::{style::ChatFormatting, FormattedText};
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::{Cursor, Write};
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundSetPlayerTeamPacket {
diff --git a/azalea-protocol/src/packets/game/clientbound_stop_sound_packet.rs b/azalea-protocol/src/packets/game/clientbound_stop_sound_packet.rs
index dd601da9..48c80237 100755
--- a/azalea-protocol/src/packets/game/clientbound_stop_sound_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_stop_sound_packet.rs
@@ -1,7 +1,8 @@
+use std::io::{Cursor, Write};
+
use azalea_buf::{BufReadError, McBufReadable, McBufWritable};
use azalea_core::{bitset::FixedBitSet, resource_location::ResourceLocation};
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::{Cursor, Write};
use super::clientbound_sound_packet::SoundSource;
diff --git a/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs b/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs
index 00a846e8..5934b443 100755
--- a/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs
@@ -1,10 +1,11 @@
+use std::collections::HashMap;
+use std::io::Cursor;
+
use azalea_buf::McBuf;
use azalea_chat::FormattedText;
use azalea_core::resource_location::ResourceLocation;
use azalea_inventory::ItemSlot;
use azalea_protocol_macros::ClientboundGamePacket;
-use std::collections::HashMap;
-use std::io::Cursor;
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundUpdateAdvancementsPacket {
@@ -117,9 +118,10 @@ pub struct AdvancementHolder {
#[cfg(test)]
mod tests {
- use super::*;
use azalea_buf::{McBufReadable, McBufWritable};
+ use super::*;
+
#[test]
fn test() {
let packet = ClientboundUpdateAdvancementsPacket {
diff --git a/azalea-protocol/src/packets/game/clientbound_update_tags_packet.rs b/azalea-protocol/src/packets/game/clientbound_update_tags_packet.rs
index e861e575..bcdef64a 100755
--- a/azalea-protocol/src/packets/game/clientbound_update_tags_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_update_tags_packet.rs
@@ -1,10 +1,11 @@
+use std::io::Cursor;
+use std::ops::Deref;
+use std::{collections::HashMap, io::Write};
+
use azalea_buf::{BufReadError, McBuf, McBufVarReadable, McBufVarWritable};
use azalea_buf::{McBufReadable, McBufWritable};
use azalea_core::resource_location::ResourceLocation;
use azalea_protocol_macros::ClientboundGamePacket;
-use std::io::Cursor;
-use std::ops::Deref;
-use std::{collections::HashMap, io::Write};
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
pub struct ClientboundUpdateTagsPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_chat_command_signed_packet.rs b/azalea-protocol/src/packets/game/serverbound_chat_command_signed_packet.rs
index bb814d55..f64b79cc 100755
--- a/azalea-protocol/src/packets/game/serverbound_chat_command_signed_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_chat_command_signed_packet.rs
@@ -1,8 +1,9 @@
-use super::serverbound_chat_packet::LastSeenMessagesUpdate;
use azalea_buf::McBuf;
use azalea_crypto::MessageSignature;
use azalea_protocol_macros::ServerboundGamePacket;
+use super::serverbound_chat_packet::LastSeenMessagesUpdate;
+
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundChatCommandSignedPacket {
pub command: String,
diff --git a/azalea-protocol/src/packets/game/serverbound_container_click_packet.rs b/azalea-protocol/src/packets/game/serverbound_container_click_packet.rs
index 119af220..e2954720 100755
--- a/azalea-protocol/src/packets/game/serverbound_container_click_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_container_click_packet.rs
@@ -1,7 +1,8 @@
+use std::collections::HashMap;
+
use azalea_buf::McBuf;
use azalea_inventory::{operations::ClickType, ItemSlot};
use azalea_protocol_macros::ServerboundGamePacket;
-use std::collections::HashMap;
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundContainerClickPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_interact_packet.rs b/azalea-protocol/src/packets/game/serverbound_interact_packet.rs
index 315134c9..e393920c 100755
--- a/azalea-protocol/src/packets/game/serverbound_interact_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_interact_packet.rs
@@ -1,8 +1,10 @@
-use crate::packets::BufReadError;
+use std::io::{Cursor, Write};
+
use azalea_buf::{McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable};
use azalea_core::position::Vec3;
use azalea_protocol_macros::ServerboundGamePacket;
-use std::io::{Cursor, Write};
+
+use crate::packets::BufReadError;
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundInteractPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs b/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs
index 384f7dcc..900d1824 100755
--- a/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs
@@ -1,8 +1,10 @@
-use crate::packets::BufReadError;
+use std::io::Cursor;
+
use azalea_buf::{McBufReadable, McBufWritable};
use azalea_core::bitset::FixedBitSet;
use azalea_protocol_macros::ServerboundGamePacket;
-use std::io::Cursor;
+
+use crate::packets::BufReadError;
#[derive(Clone, Debug, ServerboundGamePacket)]
pub struct ServerboundPlayerAbilitiesPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_seen_advancements_packet.rs b/azalea-protocol/src/packets/game/serverbound_seen_advancements_packet.rs
index fb15293b..54fd4cc9 100755
--- a/azalea-protocol/src/packets/game/serverbound_seen_advancements_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_seen_advancements_packet.rs
@@ -1,8 +1,10 @@
-use crate::packets::BufReadError;
+use std::io::Cursor;
+
use azalea_buf::{McBuf, McBufReadable, McBufWritable};
use azalea_core::resource_location::ResourceLocation;
use azalea_protocol_macros::ServerboundGamePacket;
-use std::io::Cursor;
+
+use crate::packets::BufReadError;
#[derive(Clone, Debug, ServerboundGamePacket)]
pub struct ServerboundSeenAdvancementsPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_set_command_block_packet.rs b/azalea-protocol/src/packets/game/serverbound_set_command_block_packet.rs
index c5feb213..db6557fd 100755
--- a/azalea-protocol/src/packets/game/serverbound_set_command_block_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_set_command_block_packet.rs
@@ -1,8 +1,10 @@
-use crate::packets::McBufWritable;
+use std::io::Cursor;
+
use azalea_buf::{BufReadError, McBuf, McBufReadable};
use azalea_core::{bitset::FixedBitSet, position::BlockPos};
use azalea_protocol_macros::ServerboundGamePacket;
-use std::io::Cursor;
+
+use crate::packets::McBufWritable;
#[derive(Clone, Debug, ServerboundGamePacket)]
pub struct ServerboundSetCommandBlockPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_set_jigsaw_block_packet.rs b/azalea-protocol/src/packets/game/serverbound_set_jigsaw_block_packet.rs
index a4b6f726..33a82311 100755
--- a/azalea-protocol/src/packets/game/serverbound_set_jigsaw_block_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_set_jigsaw_block_packet.rs
@@ -1,12 +1,14 @@
-use crate::packets::BufReadError;
-use crate::packets::McBufWritable;
+use std::io::Cursor;
+use std::io::Write;
+
use azalea_buf::McBuf;
use azalea_buf::McBufReadable;
use azalea_core::position::BlockPos;
use azalea_core::resource_location::ResourceLocation;
use azalea_protocol_macros::ServerboundGamePacket;
-use std::io::Cursor;
-use std::io::Write;
+
+use crate::packets::BufReadError;
+use crate::packets::McBufWritable;
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundSetJigsawBlockPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_set_structure_block_packet.rs b/azalea-protocol/src/packets/game/serverbound_set_structure_block_packet.rs
index c10966c9..c2872812 100755
--- a/azalea-protocol/src/packets/game/serverbound_set_structure_block_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_set_structure_block_packet.rs
@@ -1,9 +1,11 @@
-use crate::packets::BufReadError;
+use std::io::{Cursor, Write};
+
use azalea_buf::McBuf;
use azalea_buf::{McBufReadable, McBufWritable};
use azalea_core::{bitset::FixedBitSet, position::BlockPos};
use azalea_protocol_macros::ServerboundGamePacket;
-use std::io::{Cursor, Write};
+
+use crate::packets::BufReadError;
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundSetStructureBlockPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_swing_packet.rs b/azalea-protocol/src/packets/game/serverbound_swing_packet.rs
index a3190843..53b4a6c1 100755
--- a/azalea-protocol/src/packets/game/serverbound_swing_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_swing_packet.rs
@@ -1,7 +1,8 @@
-use crate::packets::game::serverbound_interact_packet::InteractionHand;
use azalea_buf::McBuf;
use azalea_protocol_macros::ServerboundGamePacket;
+use crate::packets::game::serverbound_interact_packet::InteractionHand;
+
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundSwingPacket {
pub hand: InteractionHand,
diff --git a/azalea-protocol/src/packets/game/serverbound_use_item_on_packet.rs b/azalea-protocol/src/packets/game/serverbound_use_item_on_packet.rs
index 2d471114..66048327 100755
--- a/azalea-protocol/src/packets/game/serverbound_use_item_on_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_use_item_on_packet.rs
@@ -1,11 +1,13 @@
-use crate::packets::game::serverbound_interact_packet::InteractionHand;
+use std::io::{Cursor, Write};
+
use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable};
use azalea_core::{
direction::Direction,
position::{BlockPos, Vec3},
};
use azalea_protocol_macros::ServerboundGamePacket;
-use std::io::{Cursor, Write};
+
+use crate::packets::game::serverbound_interact_packet::InteractionHand;
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundUseItemOnPacket {
diff --git a/azalea-protocol/src/packets/game/serverbound_use_item_packet.rs b/azalea-protocol/src/packets/game/serverbound_use_item_packet.rs
index 3129244a..b9f12f23 100755
--- a/azalea-protocol/src/packets/game/serverbound_use_item_packet.rs
+++ b/azalea-protocol/src/packets/game/serverbound_use_item_packet.rs
@@ -1,7 +1,8 @@
-use crate::packets::game::serverbound_interact_packet::InteractionHand;
use azalea_buf::McBuf;
use azalea_protocol_macros::ServerboundGamePacket;
+use crate::packets::game::serverbound_interact_packet::InteractionHand;
+
#[derive(Clone, Debug, McBuf, ServerboundGamePacket)]
pub struct ServerboundUseItemPacket {
pub hand: InteractionHand,