diff options
| author | mat <github@matdoes.dev> | 2022-05-08 18:55:49 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-08 18:55:49 -0500 |
| commit | ac392542ce223639c8615035a0be050fff12030a (patch) | |
| tree | 460f8019c2a7aeada10a714f624002ef53007be2 /azalea-protocol/src/packets/login | |
| parent | e0239865659b2f2750edda7556548f6a2b8d4127 (diff) | |
| parent | d783a0295b11c32f1b5425cab2461f9297f7f8fa (diff) | |
| download | azalea-drasl-ac392542ce223639c8615035a0be050fff12030a.tar.xz | |
Merge branch 'main' into chunk-decoding
Diffstat (limited to 'azalea-protocol/src/packets/login')
| -rwxr-xr-x | azalea-protocol/src/packets/login/clientbound_custom_query_packet.rs | 2 | ||||
| -rwxr-xr-x | azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/azalea-protocol/src/packets/login/clientbound_custom_query_packet.rs b/azalea-protocol/src/packets/login/clientbound_custom_query_packet.rs index 9e1e1df5..fc5dd1a2 100755 --- a/azalea-protocol/src/packets/login/clientbound_custom_query_packet.rs +++ b/azalea-protocol/src/packets/login/clientbound_custom_query_packet.rs @@ -5,7 +5,7 @@ use std::hash::Hash; #[derive(Hash, Clone, Debug, LoginPacket)] pub struct ClientboundCustomQueryPacket { - #[varint] + #[var] pub transaction_id: u32, pub identifier: ResourceLocation, pub data: UnsizedByteArray, 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 dd077ced..dd11f7f7 100755 --- a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs +++ b/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs @@ -1,6 +1,7 @@ use std::io::{Read, Write}; use super::LoginPacket; +use crate::mc_buf::McBufReadable; use crate::mc_buf::{Readable, Writable}; use azalea_auth::game_profile::GameProfile; use azalea_core::serializable_uuid::SerializableUuid; @@ -26,13 +27,7 @@ impl ClientboundGameProfilePacket { } pub fn read(buf: &mut impl Read) -> Result<LoginPacket, String> { - // TODO: we have a thing to read from the uuid now - let uuid = Uuid::from_int_array([ - buf.read_int()? as u32, - buf.read_int()? as u32, - buf.read_int()? as u32, - buf.read_int()? as u32, - ]); + let uuid = Uuid::read_into(buf)?; let name = buf.read_utf_with_len(16)?; Ok(ClientboundGameProfilePacket { game_profile: GameProfile::new(uuid, name), |
