diff options
Diffstat (limited to 'azalea-protocol/src')
| -rwxr-xr-x | azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs | 16 | ||||
| -rw-r--r-- | azalea-protocol/src/packets/login/serverbound_key_packet.rs | 5 |
2 files changed, 9 insertions, 12 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs index 01f633f4..5617b0c4 100755 --- a/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs @@ -111,7 +111,7 @@ impl McBufWritable for BrigadierString { } } -#[derive(Debug, Clone, McBuf)] +#[derive(Debug, Clone, Copy, McBuf)] pub enum BrigadierParserType { Bool = 0, Double, @@ -236,13 +236,13 @@ impl McBufReadable for BrigadierParser { BrigadierParserType::String => { Ok(BrigadierParser::String(BrigadierString::read_into(buf)?)) } - BrigadierParserType::Entity { - single, - players_only, - } => Ok(BrigadierParser::Entity { - single, - players_only, - }), + BrigadierParserType::Entity => { + let flags = buf.read_byte()?; + Ok(BrigadierParser::Entity { + single: flags & 0x01 != 0, + players_only: flags & 0x02 != 0, + }) + } BrigadierParserType::GameProfile => Ok(BrigadierParser::GameProfile), BrigadierParserType::BlockPos => Ok(BrigadierParser::BlockPos), BrigadierParserType::ColumnPos => Ok(BrigadierParser::ColumnPos), diff --git a/azalea-protocol/src/packets/login/serverbound_key_packet.rs b/azalea-protocol/src/packets/login/serverbound_key_packet.rs index 2c970036..d57b122a 100644 --- a/azalea-protocol/src/packets/login/serverbound_key_packet.rs +++ b/azalea-protocol/src/packets/login/serverbound_key_packet.rs @@ -1,9 +1,6 @@ use azalea_crypto::SaltSignaturePair; use packet_macros::{LoginPacket, McBuf}; -use std::{ - hash::Hash, - io::{Read, Write}, -}; +use std::io::{Read, Write}; use crate::mc_buf::{McBufReadable, McBufWritable}; |
