diff options
| author | mat <github@matdoes.dev> | 2022-07-29 02:59:40 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-07-29 02:59:40 -0500 |
| commit | 4ee4687053b7442f518823b08099c156f4da4e83 (patch) | |
| tree | 11bb56330ed172a961d0a19069a086798d0aa804 /azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs | |
| parent | aadf2de3cb751d563e743599a7fb345c08010f5a (diff) | |
| download | azalea-drasl-4ee4687053b7442f518823b08099c156f4da4e83.tar.xz | |
Split clientbound and serverbound packets
Diffstat (limited to 'azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs | 8 |
1 files changed, 4 insertions, 4 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 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<LoginPacket, String> { + pub fn read(buf: &mut impl Read) -> Result<ClientboundLoginPacket, String> { let uuid = Uuid::read_from(buf)?; let name = buf.read_utf_with_len(16)?; Ok(ClientboundGameProfilePacket { |
