From f0a277788c30392b630d4a8e8b09e9cd3e54c14f Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 7 May 2022 12:22:57 -0500 Subject: add set time packet and update readme --- azalea-protocol/src/packets/game/clientbound_set_time_packet.rs | 7 +++++++ azalea-protocol/src/packets/game/mod.rs | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 azalea-protocol/src/packets/game/clientbound_set_time_packet.rs (limited to 'azalea-protocol/src') diff --git a/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs new file mode 100644 index 00000000..02bf88d7 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs @@ -0,0 +1,7 @@ +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundSetTimePacket { + pub game_time: u64, + pub day_time: u64, +} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 852a9525..0b717add 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -19,6 +19,7 @@ pub mod clientbound_set_carried_item_packet; pub mod clientbound_set_chunk_cache_center; pub mod clientbound_set_entity_data_packet; pub mod clientbound_set_entity_link_packet; +pub mod clientbound_set_time_packet; pub mod clientbound_update_attributes_packet; pub mod clientbound_update_recipes_packet; pub mod clientbound_update_tags_packet; @@ -55,6 +56,7 @@ declare_state_packets!( 0x4d: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket, 0x45: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket, 0x4f: clientbound_entity_velocity_packet::ClientboundEntityVelocityPacket, + 0x59: clientbound_set_time_packet::ClientboundSetTimePacket, 0x64: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket, 0x66: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket, 0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket -- cgit v1.2.3