From aa3ba64aa45abcafb6aa9c1981730d3270a3b0a5 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 7 May 2022 17:59:03 -0500 Subject: actually generate a packet! --- .../packets/game/clientbound_set_default_spawn_position_packet.rs | 8 ++++++++ azalea-protocol/src/packets/game/mod.rs | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 azalea-protocol/src/packets/game/clientbound_set_default_spawn_position_packet.rs (limited to 'azalea-protocol/src') diff --git a/azalea-protocol/src/packets/game/clientbound_set_default_spawn_position_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_default_spawn_position_packet.rs new file mode 100644 index 00000000..dad050cc --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_set_default_spawn_position_packet.rs @@ -0,0 +1,8 @@ +use azalea_core::BlockPos; +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundSetDefaultSpawnPositionPacket { + pub pos: BlockPos, + pub angle: f32, +} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 0b717add..99cafe56 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -17,6 +17,7 @@ pub mod clientbound_player_position_packet; pub mod clientbound_recipe_packet; pub mod clientbound_set_carried_item_packet; pub mod clientbound_set_chunk_cache_center; +pub mod clientbound_set_default_spawn_position_packet; pub mod clientbound_set_entity_data_packet; pub mod clientbound_set_entity_link_packet; pub mod clientbound_set_time_packet; @@ -53,12 +54,13 @@ declare_state_packets!( 0x48: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket, 0x49: clientbound_set_chunk_cache_center::ClientboundSetChunkCacheCenterPacket, 0x4a: clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket, + 0x4b: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket, 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 + 0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket, } ); -- cgit v1.2.3