aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/login
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-08 18:55:49 -0500
committermat <github@matdoes.dev>2022-05-08 18:55:49 -0500
commitac392542ce223639c8615035a0be050fff12030a (patch)
tree460f8019c2a7aeada10a714f624002ef53007be2 /azalea-protocol/src/packets/login
parente0239865659b2f2750edda7556548f6a2b8d4127 (diff)
parentd783a0295b11c32f1b5425cab2461f9297f7f8fa (diff)
downloadazalea-drasl-ac392542ce223639c8615035a0be050fff12030a.tar.xz
Merge branch 'main' into chunk-decoding
Diffstat (limited to 'azalea-protocol/src/packets/login')
-rwxr-xr-xazalea-protocol/src/packets/login/clientbound_custom_query_packet.rs2
-rwxr-xr-xazalea-protocol/src/packets/login/clientbound_game_profile_packet.rs9
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),