diff options
Diffstat (limited to 'azalea-protocol')
| -rwxr-xr-x | azalea-protocol/packet-macros/src/lib.rs | 7 | ||||
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs | 13 |
2 files changed, 9 insertions, 11 deletions
diff --git a/azalea-protocol/packet-macros/src/lib.rs b/azalea-protocol/packet-macros/src/lib.rs index 927e783b..5ea69a62 100755 --- a/azalea-protocol/packet-macros/src/lib.rs +++ b/azalea-protocol/packet-macros/src/lib.rs @@ -354,7 +354,7 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { }); } for PacketIdPair { id, module, name } in input.clientbound.packets { - let name_litstr = syn::LitStr::new(&name.to_string(), name.span()); + // let name_litstr = syn::LitStr::new(&name.to_string(), name.span()); enum_contents.extend(quote! { #name(#module::#name), }); @@ -365,10 +365,7 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { #state_name::#name(packet) => packet.write(buf), }); clientbound_read_match_contents.extend(quote! { - #id => { - println!("reading packet {}", #name_litstr); - #module::#name::read(buf)? - }, + #id => #module::#name::read(buf)?, }); } diff --git a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs index 9afd151b..8a8a713e 100644 --- a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs @@ -4,9 +4,9 @@ use uuid::Uuid; #[derive(Clone, Debug, McBuf, GamePacket)] pub struct ClientboundAddEntityPacket { #[var] - pub id: i32, + pub id: u32, pub uuid: Uuid, - // TODO: have an entity type struct + // TODO: have an entity type enum/struct #[var] pub entity_type: i32, pub x: f64, @@ -14,9 +14,10 @@ pub struct ClientboundAddEntityPacket { pub z: f64, pub x_rot: i8, pub y_rot: i8, - // pub y_head_rot: i8, + pub y_head_rot: i8, + #[var] pub data: i32, - pub x_vel: u16, - pub y_vel: u16, - pub z_vel: u16, + pub x_vel: i16, + pub y_vel: i16, + pub z_vel: i16, } |
