diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-07-30 22:57:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-30 22:57:02 +0000 |
| commit | bc71c74bef5f82de7224f97a65614251f3ed7cb1 (patch) | |
| tree | 254a58c1ac77b047df0b86d75d3c6d9dd52c14fc /azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs | |
| parent | 060d2f1592b98bca64b2ee15e103aa14db816227 (diff) | |
| parent | 9ef1e8d653acd7e8e026cbde9c0320cedb8cf1d3 (diff) | |
| download | azalea-drasl-bc71c74bef5f82de7224f97a65614251f3ed7cb1.tar.xz | |
Merge pull request #13 from mat-1/split-clientbound-serverbound
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 { |
