diff options
Diffstat (limited to 'azalea-protocol/src/packets')
| -rwxr-xr-x | azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs | 9 |
1 files changed, 2 insertions, 7 deletions
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), |
