diff --git a/src/protocol/codec.rs b/src/protocol/codec.rs index 0054372c9..0ce55cc99 100644 --- a/src/protocol/codec.rs +++ b/src/protocol/codec.rs @@ -200,7 +200,7 @@ impl Decoder { .context("decoding packet after decompressing")?; ensure!( decompressed.is_empty(), - "packet contents were not read completely" + format!("packet contents were not read completely, {} remaining bytes", decompressed.len()) ); packet } else { diff --git a/src/protocol/packets/c2s.rs b/src/protocol/packets/c2s.rs index 735183f88..866b5442c 100644 --- a/src/protocol/packets/c2s.rs +++ b/src/protocol/packets/c2s.rs @@ -150,6 +150,27 @@ pub mod play { salt: u64, signature: Vec, signed_preview: bool, + acknowledgement: LastSeenMessageListAcknowledgement, + } + } + + def_struct! { + LastSeenMessageList { + entries: Vec, + } + } + + def_struct! { + LastSeenMessageListEntry { + profile_id: Uuid, + last_signature: Vec, + } + } + + def_struct! { + LastSeenMessageListAcknowledgement { + last_seen: LastSeenMessageList, + last_received: Option } }