From 751098b636c9aee54b9ca7a465fdaa769f10be4d Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 18 Apr 2022 22:38:53 -0500 Subject: start working on declare commands packet --- azalea-client/src/connect.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'azalea-client/src') diff --git a/azalea-client/src/connect.rs b/azalea-client/src/connect.rs index 7b1da525..bc45a121 100644 --- a/azalea-client/src/connect.rs +++ b/azalea-client/src/connect.rs @@ -73,6 +73,9 @@ pub async fn join_server(address: &ServerAddress) -> Result<(), String> { GamePacket::ClientboundChangeDifficultyPacket(p) => { println!("Got difficulty packet {:?}", p); } + GamePacket::ClientboundDeclareCommandsPacket(p) => { + println!("Got declare commands packet {:?}", p); + } }, Err(e) => { println!("Error: {:?}", e); -- cgit v1.2.3 From cafa4dd76fecc9e331f35145e10539e1f5ac85f6 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 19 Apr 2022 21:24:42 -0500 Subject: Fix declare_state_packets --- azalea-client/src/ping.rs | 2 +- azalea-protocol/packet-macros/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-client/src') diff --git a/azalea-client/src/ping.rs b/azalea-client/src/ping.rs index 87ccdf66..8ecff7ca 100644 --- a/azalea-client/src/ping.rs +++ b/azalea-client/src/ping.rs @@ -38,7 +38,7 @@ pub async fn ping_server( let packet = conn.read().await.unwrap(); match packet { - StatusPacket::ClientboundStatusResponsePacket(p) => Ok(*p), + StatusPacket::ClientboundStatusResponsePacket(p) => Ok(p), _ => Err("Invalid packet type".to_string()), } } diff --git a/azalea-protocol/packet-macros/src/lib.rs b/azalea-protocol/packet-macros/src/lib.rs index d7f54d84..bdb83871 100644 --- a/azalea-protocol/packet-macros/src/lib.rs +++ b/azalea-protocol/packet-macros/src/lib.rs @@ -286,11 +286,11 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { { Ok(match flow { crate::connect::PacketFlow::ServerToClient => match id { - #serverbound_read_match_contents + #clientbound_read_match_contents _ => panic!("Unknown ServerToClient {} packet id: {}", #state_name_litstr, id), }, crate::connect::PacketFlow::ClientToServer => match id { - #clientbound_read_match_contents + #serverbound_read_match_contents _ => return Err(format!("Unknown ClientToServer {} packet id: {}", #state_name_litstr, id)), }, }) -- cgit v1.2.3