diff options
| author | mat <github@matdoes.dev> | 2022-05-07 20:41:33 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-07 20:41:33 -0500 |
| commit | 98eee6d908a5651c55131b80dc3c153a6708052e (patch) | |
| tree | 72c70b5af9e113f16fb54871be2bb34e94cac20a /azalea-protocol/src/packets | |
| parent | 49454781cf02c85e065cf1cf4de22701175f3f13 (diff) | |
| download | azalea-drasl-98eee6d908a5651c55131b80dc3c153a6708052e.tar.xz | |
add keepalive packets
Diffstat (limited to 'azalea-protocol/src/packets')
3 files changed, 16 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_keep_alive_packet.rs b/azalea-protocol/src/packets/game/clientbound_keep_alive_packet.rs new file mode 100644 index 00000000..d5dab9a9 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_keep_alive_packet.rs @@ -0,0 +1,6 @@ +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundKeepAlivePacket { + pub id: u64, +} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 78091788..9f1bce0d 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -9,6 +9,7 @@ pub mod clientbound_disconnect_packet; pub mod clientbound_entity_event_packet; pub mod clientbound_entity_velocity_packet; pub mod clientbound_initialize_border_packet; +pub mod clientbound_keep_alive_packet; pub mod clientbound_level_chunk_with_light_packet; pub mod clientbound_light_update_packet; pub mod clientbound_login_packet; @@ -35,6 +36,7 @@ pub mod clientbound_update_recipes_packet; pub mod clientbound_update_tags_packet; pub mod clientbound_update_view_distance_packet; pub mod serverbound_custom_payload_packet; +pub mod serverbound_keep_alive_packet; use packet_macros::declare_state_packets; @@ -42,6 +44,7 @@ declare_state_packets!( GamePacket, Serverbound => { 0x0a: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket, + 0x0f: serverbound_keep_alive_packet::ServerboundKeepAlivePacket, }, Clientbound => { 0x00: clientbound_add_entity_packet::ClientboundAddEntityPacket, @@ -54,6 +57,7 @@ declare_state_packets!( 0x1b: clientbound_entity_event_packet::ClientboundEntityEventPacket, 0x18: clientbound_custom_payload_packet::ClientboundCustomPayloadPacket, 0x20: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket, + 0x21: clientbound_keep_alive_packet::ClientboundKeepAlivePacket, 0x22: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket, 0x25: clientbound_light_update_packet::ClientboundLightUpdatePacket, 0x26: clientbound_login_packet::ClientboundLoginPacket, diff --git a/azalea-protocol/src/packets/game/serverbound_keep_alive_packet.rs b/azalea-protocol/src/packets/game/serverbound_keep_alive_packet.rs new file mode 100644 index 00000000..740b18e3 --- /dev/null +++ b/azalea-protocol/src/packets/game/serverbound_keep_alive_packet.rs @@ -0,0 +1,6 @@ +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ServerboundKeepAlivePacket { + pub id: u64, +} |
