aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets')
-rw-r--r--azalea-protocol/src/packets/game/c_add_entity.rs5
-rw-r--r--azalea-protocol/src/packets/game/c_map_item_data.rs2
-rw-r--r--azalea-protocol/src/packets/game/c_player_chat.rs9
-rw-r--r--azalea-protocol/src/packets/game/s_use_item_on.rs7
-rw-r--r--azalea-protocol/src/packets/mod.rs2
5 files changed, 14 insertions, 11 deletions
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<FormattedText>,
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<PackedMessageSignature>,
}
-/// 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<MessageSignature>),
@@ -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<Self, Box<ReadPacketError>>;
fn write(&self, buf: &mut impl Write) -> io::Result<()>;