diff options
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs index f4f528cf..3ca1ac85 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs @@ -1,9 +1,7 @@ -// i don't know the actual name of this packet, i couldn't find it in the source code +use std::io::Read; use crate::mc_buf::{McBufReadable, McBufWritable, Readable}; -use async_trait::async_trait; use packet_macros::GamePacket; -use tokio::io::AsyncRead; #[derive(Clone, Debug, GamePacket)] pub struct ClientboundPlayerAbilitiesPacket { @@ -21,13 +19,9 @@ pub struct PlayerAbilitiesFlags { pub instant_break: bool, } -#[async_trait] impl McBufReadable for PlayerAbilitiesFlags { - async fn read_into<R>(buf: &mut R) -> Result<Self, String> - where - R: AsyncRead + std::marker::Unpin + std::marker::Send, - { - let byte = buf.read_byte().await?; + fn read_into(buf: &mut impl Read) -> Result<Self, String> { + let byte = buf.read_byte()?; Ok(PlayerAbilitiesFlags { invulnerable: byte & 1 != 0, flying: byte & 2 != 0, |
