diff options
Diffstat (limited to 'azalea-protocol/src/packets/login')
5 files changed, 24 insertions, 1 deletions
diff --git a/azalea-protocol/src/packets/login/clientbound_cookie_request_packet.rs b/azalea-protocol/src/packets/login/clientbound_cookie_request_packet.rs new file mode 100755 index 00000000..27ea0c09 --- /dev/null +++ b/azalea-protocol/src/packets/login/clientbound_cookie_request_packet.rs @@ -0,0 +1,8 @@ +use azalea_buf::McBuf; +use azalea_chat::FormattedText; +use azalea_protocol_macros::ClientboundLoginPacket; + +#[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] +pub struct ClientboundCookieRequestPacket { + pub key: FormattedText, +} diff --git a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs b/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs index 2783159a..51f486d0 100755 --- a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs +++ b/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs @@ -5,4 +5,5 @@ use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] pub struct ClientboundGameProfilePacket { pub game_profile: GameProfile, + pub strict_error_handling: bool, } diff --git a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs b/azalea-protocol/src/packets/login/clientbound_hello_packet.rs index 0d5cce7d..9beb499c 100755 --- a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs +++ b/azalea-protocol/src/packets/login/clientbound_hello_packet.rs @@ -7,5 +7,6 @@ pub struct ClientboundHelloPacket { // #[len(20)] pub server_id: String, pub public_key: Vec<u8>, - pub nonce: Vec<u8>, + pub challenge: Vec<u8>, + pub should_authenticate: bool, } diff --git a/azalea-protocol/src/packets/login/mod.rs b/azalea-protocol/src/packets/login/mod.rs index f9bf8dad..2037f2c1 100755 --- a/azalea-protocol/src/packets/login/mod.rs +++ b/azalea-protocol/src/packets/login/mod.rs @@ -1,8 +1,10 @@ +pub mod clientbound_cookie_request_packet; pub mod clientbound_custom_query_packet; pub mod clientbound_game_profile_packet; pub mod clientbound_hello_packet; pub mod clientbound_login_compression_packet; pub mod clientbound_login_disconnect_packet; +pub mod serverbound_cookie_response_packet; pub mod serverbound_custom_query_answer_packet; pub mod serverbound_hello_packet; pub mod serverbound_key_packet; @@ -17,6 +19,7 @@ declare_state_packets!( 0x01: serverbound_key_packet::ServerboundKeyPacket, 0x02: serverbound_custom_query_answer_packet::ServerboundCustomQueryAnswerPacket, 0x03: serverbound_login_acknowledged_packet::ServerboundLoginAcknowledgedPacket, + 0x04: serverbound_cookie_response_packet::ServerboundCookieResponsePacket, }, Clientbound => { 0x00: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket, @@ -24,5 +27,6 @@ declare_state_packets!( 0x02: clientbound_game_profile_packet::ClientboundGameProfilePacket, 0x03: clientbound_login_compression_packet::ClientboundLoginCompressionPacket, 0x04: clientbound_custom_query_packet::ClientboundCustomQueryPacket, + 0x05: clientbound_cookie_request_packet::ClientboundCookieRequestPacket, } ); diff --git a/azalea-protocol/src/packets/login/serverbound_cookie_response_packet.rs b/azalea-protocol/src/packets/login/serverbound_cookie_response_packet.rs new file mode 100755 index 00000000..2074e2e7 --- /dev/null +++ b/azalea-protocol/src/packets/login/serverbound_cookie_response_packet.rs @@ -0,0 +1,9 @@ +use azalea_buf::McBuf; +use azalea_core::resource_location::ResourceLocation; +use azalea_protocol_macros::ServerboundLoginPacket; + +#[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] +pub struct ServerboundCookieResponsePacket { + pub key: ResourceLocation, + pub payload: Option<Vec<u8>>, +} |
