aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWebbiii <webbiii@webbiii.cc>2022-08-11 02:03:41 +0200
committerGitHub <noreply@github.com>2022-08-11 02:03:41 +0200
commit9c7675ccba88a130f7096f27ee61e593fbdb6462 (patch)
treebaf8ca55c63a5342c588bb06974c4678e876ad68 /src
parent2f0e3b6164c0b4a388672073e4b1730ae07096b8 (diff)
downloadmcproto-rs-9c7675ccba88a130f7096f27ee61e593fbdb6462.tar.gz
mcproto-rs-9c7675ccba88a130f7096f27ee61e593fbdb6462.tar.bz2
mcproto-rs-9c7675ccba88a130f7096f27ee61e593fbdb6462.zip
Fix 1.19 login packets
Diffstat (limited to 'src')
-rw-r--r--src/v1_19.rs21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/v1_19.rs b/src/v1_19.rs
index f792eae..0f2d58d 100644
--- a/src/v1_19.rs
+++ b/src/v1_19.rs
@@ -54,11 +54,12 @@ define_protocol!(759, Packet759, RawPacket759, RawPacket759Body, Packet759Kind =
data: RemainingBytes
},
LoginStart, 0x00, Login, ServerBound => LoginStartSpec {
- name: String
+ name: String,
+ signature_data: Option<LoginSignatureData>
},
LoginEncryptionResponse, 0x01, Login, ServerBound => LoginEncryptionResponseSpec {
shared_secret: CountedArray<u8, VarInt>,
- verify_token: CountedArray<u8, VarInt>
+ encryption_data: EncryptionResponseData
},
LoginPluginResponse, 0x02, Login, ServerBound => LoginPluginResponseSpec {
message_id: VarInt,
@@ -795,6 +796,22 @@ proto_byte_enum!(HandshakeNextState,
0x02 :: Login
);
+proto_struct!(LoginSignatureData {
+ key_expires: i64,
+ public_key: Option<CountedArray<u8, VarInt>>,
+ signature: Option<CountedArray<u8, VarInt>>
+});
+
+proto_byte_enum!(EncryptionResponseData,
+ 0x00 :: KeySignature(EncryptionResponseKeySignatureData),
+ 0x01 :: VerifyToken(CountedArray<u8, VarInt>)
+);
+
+proto_struct!(EncryptionResponseKeySignatureData {
+ salt: i64,
+ signature: CountedArray<u8, VarInt>
+});
+
proto_byte_enum!(CardinalDirection,
0x00 :: South,
0x01 :: West,