From ee2575794e91b9457a74a95daf1dcc707058cd58 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 12 Oct 2025 23:01:54 +0300 Subject: upgrade deps and clean up lots of doc comments --- azalea-protocol/src/packets/game/c_add_entity.rs | 5 +++-- azalea-protocol/src/packets/game/c_map_item_data.rs | 2 +- azalea-protocol/src/packets/game/c_player_chat.rs | 9 +++++---- azalea-protocol/src/packets/game/s_use_item_on.rs | 7 ++++--- azalea-protocol/src/packets/mod.rs | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) (limited to 'azalea-protocol/src/packets') diff --git a/azalea-protocol/src/packets/game/c_add_entity.rs b/azalea-protocol/src/packets/game/c_add_entity.rs index 7fb680a1..fe473289 100644 --- a/azalea-protocol/src/packets/game/c_add_entity.rs +++ b/azalea-protocol/src/packets/game/c_add_entity.rs @@ -30,8 +30,9 @@ pub struct ClientboundAddEntity { } impl ClientboundAddEntity { - /// Make the entity into a bundle that can be inserted into the ECS. You - /// must apply the metadata after inserting the bundle with + /// Make the entity into a bundle that can be inserted into the ECS. + /// + /// You must apply the metadata after inserting the bundle with /// [`Self::apply_metadata`]. pub fn as_entity_bundle(&self, world_name: ResourceLocation) -> EntityBundle { EntityBundle::new(self.uuid, self.position, self.entity_type, world_name) diff --git a/azalea-protocol/src/packets/game/c_map_item_data.rs b/azalea-protocol/src/packets/game/c_map_item_data.rs index 4bd2b21d..eaf5dc9f 100644 --- a/azalea-protocol/src/packets/game/c_map_item_data.rs +++ b/azalea-protocol/src/packets/game/c_map_item_data.rs @@ -19,7 +19,7 @@ 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 + /// Minecraft does `& 15` on this value and azalea-protocol doesn't. I don't /// think it matters. pub rot: i8, pub name: Option, diff --git a/azalea-protocol/src/packets/game/c_player_chat.rs b/azalea-protocol/src/packets/game/c_player_chat.rs index 1e65864c..75683c21 100644 --- a/azalea-protocol/src/packets/game/c_player_chat.rs +++ b/azalea-protocol/src/packets/game/c_player_chat.rs @@ -41,7 +41,7 @@ pub struct PackedLastSeenMessages { pub entries: Vec, } -/// Messages can be deleted by either their signature or message id. +/// Messages can be deleted by either their signature or message ID. #[derive(Clone, Debug, PartialEq)] pub enum PackedMessageSignature { Signature(Box), @@ -88,9 +88,10 @@ pub struct MessageSignatureCache { } impl ClientboundPlayerChat { - /// Returns the content of the message. If you want to get the FormattedText - /// for the whole message including the sender part, use - /// [`ClientboundPlayerChat::message`]. + /// Returns the content of the message. + /// + /// If you want to get the [`FormattedText`] for the whole message including + /// the sender part, use [`ClientboundPlayerChat::message`]. #[must_use] pub fn content(&self) -> FormattedText { self.unsigned_content diff --git a/azalea-protocol/src/packets/game/s_use_item_on.rs b/azalea-protocol/src/packets/game/s_use_item_on.rs index e97d8aaf..61d7fc78 100644 --- a/azalea-protocol/src/packets/game/s_use_item_on.rs +++ b/azalea-protocol/src/packets/game/s_use_item_on.rs @@ -24,9 +24,10 @@ pub struct BlockHit { pub block_pos: BlockPos, /// The face of the block that was clicked. pub direction: Direction, - /// The exact coordinates of the world where the block was clicked. In the - /// network, this is transmitted as the difference between the location and - /// block position. + /// The exact coordinates of the world where the block was clicked. + /// + /// In the network, this is transmitted as the difference between the + /// location and block position. pub location: Vec3, /// Whether the player's head is inside a block. pub inside: bool, diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index e532ebcd..cbcf4d6d 100644 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -50,7 +50,7 @@ where /// like `pong`. fn name(&self) -> &'static str; - /// Read a packet by its id, `ConnectionProtocol`, and flow + /// Read a packet by its ID, `ConnectionProtocol`, and flow. fn read(id: u32, buf: &mut Cursor<&[u8]>) -> Result>; fn write(&self, buf: &mut impl Write) -> io::Result<()>; -- cgit v1.2.3