diff options
Diffstat (limited to 'azalea-protocol/src/packets')
7 files changed, 19 insertions, 13 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs b/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs index 03585f06..58c7b0a3 100755 --- a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs @@ -4,7 +4,8 @@ use azalea_protocol_macros::ClientboundGamePacket; use azalea_world::entity::{metadata, EntityData, EntityMetadata}; use uuid::Uuid; -/// This packet is sent by the server when a player comes into visible range, not when a player joins. +/// This packet is sent by the server when a player comes into visible range, +/// not when a player joins. #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] pub struct ClientboundAddPlayerPacket { #[var] diff --git a/azalea-protocol/src/packets/game/clientbound_commands_packet.rs b/azalea-protocol/src/packets/game/clientbound_commands_packet.rs index ce578176..39e807cf 100755 --- a/azalea-protocol/src/packets/game/clientbound_commands_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_commands_packet.rs @@ -73,7 +73,8 @@ impl<T: McBufWritable> McBufWritable for BrigadierNumber<T> { pub enum BrigadierString { /// Reads a single word SingleWord = 0, - // If it starts with a ", keeps reading until another " (allowing escaping with \). Otherwise behaves the same as SINGLE_WORD + // If it starts with a ", keeps reading until another " (allowing escaping with \). Otherwise + // behaves the same as SINGLE_WORD QuotablePhrase = 1, // Reads the rest of the content after the cursor. Quotes will not be removed. GreedyPhrase = 2, diff --git a/azalea-protocol/src/packets/game/clientbound_map_item_data_packet.rs b/azalea-protocol/src/packets/game/clientbound_map_item_data_packet.rs index 07e49687..94593e3e 100755 --- a/azalea-protocol/src/packets/game/clientbound_map_item_data_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_map_item_data_packet.rs @@ -73,7 +73,8 @@ pub struct MapDecoration { pub decoration_type: DecorationType, pub x: i8, pub y: i8, - /// Minecraft does & 15 on this value, azalea-protocol doesn't. I don't think it matters. + /// Minecraft does & 15 on this value, azalea-protocol doesn't. I don't + /// think it matters. pub rot: i8, pub name: Option<Component>, } 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 f22fb608..a735c907 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs @@ -83,8 +83,8 @@ pub struct MessageSignatureCache { // } // impl PackedSignedMessageBody { -// pub fn unpack(&self, unpacker: impl Fn(u32) -> Option<SignedMessageBody>) {} -// } +// pub fn unpack(&self, unpacker: impl Fn(u32) -> Option<SignedMessageBody>) +// {} } impl ClientboundPlayerChatPacket { /// Returns the content of the message. If you want to get the Component @@ -176,7 +176,8 @@ mod tests { use super::*; use std::backtrace::Backtrace; - // you can remove or update this test if it breaks because mojang changed the structure of the packet again + // you can remove or update this test if it breaks because mojang changed the + // structure of the packet again #[test] fn test_player_chat_packet() { let data: [u8; 295] = [ 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 5f63dd1a..b18193d0 100755 --- a/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs @@ -133,9 +133,9 @@ pub struct CriterionProgress { // parent_id: None, // display: Some(DisplayInfo { // title: Component::from("title".to_string()), -// description: Component::from("description".to_string()), -// icon: Slot::Empty, -// frame: FrameType::Task, +// description: +// Component::from("description".to_string()), icon: +// Slot::Empty, frame: FrameType::Task, // show_toast: true, // hidden: false, // background: None, @@ -164,7 +164,7 @@ pub struct CriterionProgress { // .collect(), // }; // packet.write_into(&mut buf).unwrap(); -// let packet = ClientboundUpdateAdvancementsPacket::read_from(&mut buf).unwrap(); -// assert_eq!(packet.reset, true); +// let packet = ClientboundUpdateAdvancementsPacket::read_from(&mut +// buf).unwrap(); assert_eq!(packet.reset, true); // } // } 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 78f77754..989009f4 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 @@ -15,7 +15,8 @@ pub struct ServerboundSetJigsawBlockPacket { pub target: ResourceLocation, pub pool: ResourceLocation, pub final_state: String, - pub joint: String, // TODO: Does JigsawBlockEntity$JointType::getSerializedName, may not be implemented + pub joint: String, /* TODO: Does JigsawBlockEntity$JointType::getSerializedName, may not be + * implemented */ } pub enum JointType { diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 76ddd05d..508d06a6 100755 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -7,7 +7,8 @@ use crate::read::ReadPacketError; use azalea_buf::{BufReadError, McBufVarReadable, McBufVarWritable, McBufWritable}; use std::io::{Cursor, Write}; -// TODO: rename the packet files to just like clientbound_add_entity instead of clientbound_add_entity_packet +// TODO: rename the packet files to just like clientbound_add_entity instead of +// clientbound_add_entity_packet pub const PROTOCOL_VERSION: u32 = 761; |
