From 4ee4687053b7442f518823b08099c156f4da4e83 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 29 Jul 2022 02:59:40 -0500 Subject: Split clientbound and serverbound packets --- .../src/packets/login/clientbound_game_profile_packet.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs') 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 a06b999b..9d9ce35b 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,6 @@ use std::io::{Read, Write}; -use super::LoginPacket; +use super::ClientboundLoginPacket; use azalea_auth::game_profile::GameProfile; use azalea_buf::{McBufReadable, Readable, SerializableUuid, Writable}; use uuid::Uuid; @@ -12,8 +12,8 @@ pub struct ClientboundGameProfilePacket { // TODO: add derives to GameProfile and have an impl McBufReadable/Writable for GameProfile impl ClientboundGameProfilePacket { - pub fn get(self) -> LoginPacket { - LoginPacket::ClientboundGameProfilePacket(self) + pub fn get(self) -> ClientboundLoginPacket { + ClientboundLoginPacket::ClientboundGameProfilePacket(self) } pub fn write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { @@ -24,7 +24,7 @@ impl ClientboundGameProfilePacket { Ok(()) } - pub fn read(buf: &mut impl Read) -> Result { + pub fn read(buf: &mut impl Read) -> Result { let uuid = Uuid::read_from(buf)?; let name = buf.read_utf_with_len(16)?; Ok(ClientboundGameProfilePacket { -- cgit v1.2.3