aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/login/serverbound_hello_packet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/login/serverbound_hello_packet.rs')
-rwxr-xr-xazalea-protocol/src/packets/login/serverbound_hello_packet.rs17
1 files changed, 4 insertions, 13 deletions
diff --git a/azalea-protocol/src/packets/login/serverbound_hello_packet.rs b/azalea-protocol/src/packets/login/serverbound_hello_packet.rs
index 5e1422fb..c0fc7b1e 100755
--- a/azalea-protocol/src/packets/login/serverbound_hello_packet.rs
+++ b/azalea-protocol/src/packets/login/serverbound_hello_packet.rs
@@ -2,20 +2,12 @@ use azalea_buf::McBuf;
use azalea_protocol_macros::ServerboundLoginPacket;
use uuid::Uuid;
-#[derive(Clone, Debug, ServerboundLoginPacket, McBuf, PartialEq, Eq)]
+#[derive(Clone, Debug, PartialEq, Eq, McBuf, ServerboundLoginPacket)]
pub struct ServerboundHelloPacket {
- pub username: String,
- pub public_key: Option<ProfilePublicKeyData>,
+ pub name: String,
pub profile_id: Option<Uuid>,
}
-#[derive(Clone, Debug, McBuf, PartialEq, Eq)]
-pub struct ProfilePublicKeyData {
- pub expires_at: u64,
- pub key: Vec<u8>,
- pub key_signature: Vec<u8>,
-}
-
#[cfg(test)]
mod tests {
use std::io::Cursor;
@@ -26,9 +18,8 @@ mod tests {
#[test]
fn test_read_write() {
let packet = ServerboundHelloPacket {
- username: "test".to_string(),
- public_key: None,
- profile_id: Some(Uuid::from_u128(0)),
+ name: "test".to_string(),
+ profile_id: Some(Uuid::nil()),
};
let mut buf: Vec<u8> = Vec::new();
packet.write_into(&mut buf).unwrap();