diff options
| author | mat <github@matdoes.dev> | 2022-04-27 23:35:34 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-04-27 23:35:34 -0500 |
| commit | 1b5a3722ee4cf0464fbb20e65debc7bbd7963b79 (patch) | |
| tree | c98a787dacf75801479b9e8fb7942d7f8e81d699 /azalea-protocol | |
| parent | 9b50886c30f3e9129e054b019581264c9e6cadaf (diff) | |
| download | azalea-drasl-1b5a3722ee4cf0464fbb20e65debc7bbd7963b79.tar.xz | |
fix player info packet
Diffstat (limited to 'azalea-protocol')
| -rwxr-xr-x | azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs | 11 | ||||
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_player_info_packet.rs | 1 |
2 files changed, 1 insertions, 11 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 b22570c1..33b710d5 100755 --- a/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs @@ -24,7 +24,6 @@ impl ClientboundDeclareCommandsPacket { buf: &mut T, ) -> Result<GamePacket, String> { let node_count = buf.read_varint().await?; - println!("node_count: {}", node_count); let mut nodes = Vec::with_capacity(node_count as usize); for _ in 0..node_count { let node = BrigadierNodeStub::read_into(buf).await?; @@ -323,21 +322,17 @@ impl McBufReadable for BrigadierNodeStub { let is_executable = flags & 0x04 != 0; let has_redirect = flags & 0x08 != 0; let has_suggestions_type = flags & 0x10 != 0; - println!("flags: {}, node_type: {}, is_executable: {}, has_redirect: {}, has_suggestions_type: {}", flags, node_type, is_executable, has_redirect, has_suggestions_type); let children = buf.read_int_id_list().await?; - println!("children: {:?}", children); let redirect_node = if has_redirect { buf.read_varint().await? } else { 0 }; - println!("redirect_node: {}", redirect_node); // argument node if node_type == 2 { let name = buf.read_utf().await?; - println!("name: {}", name); let parser = BrigadierParser::read_into(buf).await?; @@ -346,19 +341,13 @@ impl McBufReadable for BrigadierNodeStub { } else { None }; - println!( - "node_type=2, flags={}, name={}, parser={:?}, suggestions_type={:?}", - flags, name, parser, suggestions_type - ); return Ok(BrigadierNodeStub {}); } // literal node if node_type == 1 { let name = buf.read_utf().await?; - println!("node_type=1, flags={}, name={}", flags, name); return Ok(BrigadierNodeStub {}); } - println!("node_type={}, flags={}", node_type, flags); Ok(BrigadierNodeStub {}) // return Err("Unknown node type".to_string()); } diff --git a/azalea-protocol/src/packets/game/clientbound_player_info_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_info_packet.rs index 370e6f83..3d4c3ac7 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_info_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_info_packet.rs @@ -31,6 +31,7 @@ pub struct PlayerProperty { #[derive(Clone, Debug, McBufReadable, McBufWritable)] pub struct AddPlayer { uuid: Uuid, + name: String, properties: Vec<PlayerProperty>, #[varint] gamemode: u32, |
