From f5b64f1dd8b219690800ba989eb199b1a21ea295 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:07:33 +1300 Subject: [PATCH 01/64] [type] network_block_position.rs --- .../proto/src/version/v662/types/network_block_position.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/proto/src/version/v662/types/network_block_position.rs b/crates/proto/src/version/v662/types/network_block_position.rs index 8116b55b..cddb57c1 100644 --- a/crates/proto/src/version/v662/types/network_block_position.rs +++ b/crates/proto/src/version/v662/types/network_block_position.rs @@ -3,9 +3,9 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] pub struct NetworkBlockPosition { #[endianness(var)] - x: i32, + pub x: i32, #[endianness(var)] - y: u32, + pub y: u32, #[endianness(var)] - z: i32, + pub z: i32, } \ No newline at end of file From d9e71c5360a78b60dc0b19750b2f9d6d992c737a Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:07:43 +1300 Subject: [PATCH 02/64] [enum] actor_block_sync_message.rs --- .../proto/src/version/v662/enums/actor_block_sync_message.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/proto/src/version/v662/enums/actor_block_sync_message.rs b/crates/proto/src/version/v662/enums/actor_block_sync_message.rs index 970b92d1..9d453bae 100644 --- a/crates/proto/src/version/v662/enums/actor_block_sync_message.rs +++ b/crates/proto/src/version/v662/enums/actor_block_sync_message.rs @@ -2,6 +2,9 @@ pub mod ActorBlockSyncMessage { use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] + #[enum_repr(i64)] + #[enum_endianness(var)] + #[repr(i64)] pub enum MessageId { NONE = 0, CREATE = 1, From 52be3706f9b353128ed3a6c428de2d846b5b4e7e Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:07:49 +1300 Subject: [PATCH 03/64] [enum] client_play_mode.rs --- crates/proto/src/version/v662/enums/client_play_mode.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/proto/src/version/v662/enums/client_play_mode.rs b/crates/proto/src/version/v662/enums/client_play_mode.rs index f3cf49a0..d316c3fc 100644 --- a/crates/proto/src/version/v662/enums/client_play_mode.rs +++ b/crates/proto/src/version/v662/enums/client_play_mode.rs @@ -1,6 +1,9 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(u32)] +#[enum_endianness(var)] +#[repr(u32)] pub enum ClientPlayMode { Normal = 0, Teaser = 1, From 46d61437ef0fad98cfcdcc5e400303129e41ea20 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:07:55 +1300 Subject: [PATCH 04/64] [enum] identity_definition.rs --- .../version/v662/enums/identity_definition.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/crates/proto/src/version/v662/enums/identity_definition.rs b/crates/proto/src/version/v662/enums/identity_definition.rs index 2e627c5a..abcfaf81 100644 --- a/crates/proto/src/version/v662/enums/identity_definition.rs +++ b/crates/proto/src/version/v662/enums/identity_definition.rs @@ -1,11 +1,20 @@ pub mod IdentityDefinition { - use bedrockrs_macros::ProtoCodec; + use bedrockrs_macros::ProtoCodec;use crate::version::v662::types::ActorUniqueID; #[derive(ProtoCodec)] + #[enum_repr(i8)] + #[repr(i8)] pub enum Type { Invalid = 0, - Player = 1, - Entity = 2, - FakePlayer = 3, + Player { + #[endianness(var)] + player_unique_id: i64, + } = 1, + Entity { + actor_id: ActorUniqueID, + } = 2, + FakePlayer { + fake_player_name: String, + } = 3, } } \ No newline at end of file From 755f16cea174bb359177bdfdc28b9f248ee29b10 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:01 +1300 Subject: [PATCH 05/64] [enum] input_mode.rs --- crates/proto/src/version/v662/enums/input_mode.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/proto/src/version/v662/enums/input_mode.rs b/crates/proto/src/version/v662/enums/input_mode.rs index ed870489..dd7acf98 100644 --- a/crates/proto/src/version/v662/enums/input_mode.rs +++ b/crates/proto/src/version/v662/enums/input_mode.rs @@ -1,6 +1,9 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(u32)] +#[enum_endianness(var)] +#[repr(u32)] pub enum InputMode { Undefined = 0, Mouse = 1, From 96cd009e6edfc34a228b099ed5be3351330be072 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:07 +1300 Subject: [PATCH 06/64] [enum] item_stack_request_action_type.rs --- .../src/version/v662/enums/item_stack_request_action_type.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/proto/src/version/v662/enums/item_stack_request_action_type.rs b/crates/proto/src/version/v662/enums/item_stack_request_action_type.rs index 1a3e8089..6c5e44d9 100644 --- a/crates/proto/src/version/v662/enums/item_stack_request_action_type.rs +++ b/crates/proto/src/version/v662/enums/item_stack_request_action_type.rs @@ -1,6 +1,8 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] pub enum ItemStackRequestActionType { Take = 0, Place = 1, From cc70e8b55b9e8b644878bb3146f4412e8934d0d7 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:13 +1300 Subject: [PATCH 07/64] [enum] item_use_method.rs --- crates/proto/src/version/v662/enums/item_use_method.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/proto/src/version/v662/enums/item_use_method.rs b/crates/proto/src/version/v662/enums/item_use_method.rs index d1066434..8b21ce26 100644 --- a/crates/proto/src/version/v662/enums/item_use_method.rs +++ b/crates/proto/src/version/v662/enums/item_use_method.rs @@ -1,6 +1,9 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i32)] +#[enum_endianness(le)] +#[repr(i32)] pub enum ItemUseMethod { Unknown = -1, EquipArmor = 0, @@ -19,5 +22,4 @@ pub enum ItemUseMethod { Dyed = 13, Traded = 14, BrushingCompleted = 15, - Count = 16, } \ No newline at end of file From f95c3bfe03dde3250e7b32de06e17aecb4f41482 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:20 +1300 Subject: [PATCH 08/64] [enum] lab_table_reaction_type.rs --- crates/proto/src/version/v662/enums/lab_table_reaction_type.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/proto/src/version/v662/enums/lab_table_reaction_type.rs b/crates/proto/src/version/v662/enums/lab_table_reaction_type.rs index 9ca81d03..0086b5a7 100644 --- a/crates/proto/src/version/v662/enums/lab_table_reaction_type.rs +++ b/crates/proto/src/version/v662/enums/lab_table_reaction_type.rs @@ -1,6 +1,8 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] pub enum LabTableReactionType { None = 0, IceBomb = 1, From c260e2a43cbde9342ccc454d4a59dfc64dcf6108 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:28 +1300 Subject: [PATCH 09/64] [enum] multiplayer_settings_packet_type.rs --- .../version/v662/enums/multiplayer_settings_packet_type.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/proto/src/version/v662/enums/multiplayer_settings_packet_type.rs b/crates/proto/src/version/v662/enums/multiplayer_settings_packet_type.rs index 9283b3df..24dce5ec 100644 --- a/crates/proto/src/version/v662/enums/multiplayer_settings_packet_type.rs +++ b/crates/proto/src/version/v662/enums/multiplayer_settings_packet_type.rs @@ -1,8 +1,11 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i32)] +#[enum_endianness(var)] +#[repr(i32)] pub enum MultiplayerSettingsPacketType { EnableMultiplayer = 0, DisableMultiplayer = 1, - RefreshJoincode = 2, + RefreshJoinCode = 2, } \ No newline at end of file From bbf220a807181212b39b9630c7a712a580042abb Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:35 +1300 Subject: [PATCH 10/64] [enum] new_interaction_model.rs --- crates/proto/src/version/v662/enums/new_interaction_model.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/proto/src/version/v662/enums/new_interaction_model.rs b/crates/proto/src/version/v662/enums/new_interaction_model.rs index 041d3d4f..0ce9423d 100644 --- a/crates/proto/src/version/v662/enums/new_interaction_model.rs +++ b/crates/proto/src/version/v662/enums/new_interaction_model.rs @@ -1,6 +1,9 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i32)] +#[enum_endianness(var)] +#[repr(i32)] pub enum NewInteractionModel { Touch = 0, Crosshair = 1, From 8c3ea183e3473aa4cb774babede9c8a70fd1ed5b Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:41 +1300 Subject: [PATCH 11/64] [enum] objective_sort_order.rs --- crates/proto/src/version/v662/enums/objective_sort_order.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/proto/src/version/v662/enums/objective_sort_order.rs b/crates/proto/src/version/v662/enums/objective_sort_order.rs index 78c1a121..63c26dd3 100644 --- a/crates/proto/src/version/v662/enums/objective_sort_order.rs +++ b/crates/proto/src/version/v662/enums/objective_sort_order.rs @@ -1,6 +1,8 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] pub enum ObjectiveSortOrder { Ascending = 0, Descending = 1, From 56eb8c6cd9f46110a45a4316a7050b7a33655b18 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:48 +1300 Subject: [PATCH 12/64] [enum] packet_compression_algorithm.rs --- .../src/version/v662/enums/packet_compression_algorithm.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/proto/src/version/v662/enums/packet_compression_algorithm.rs b/crates/proto/src/version/v662/enums/packet_compression_algorithm.rs index 0b71472f..b655892c 100644 --- a/crates/proto/src/version/v662/enums/packet_compression_algorithm.rs +++ b/crates/proto/src/version/v662/enums/packet_compression_algorithm.rs @@ -1,6 +1,9 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(u16)] +#[enum_endianness(le)] +#[repr(u16)] pub enum PacketCompressionAlgorithm { ZLib = 0, Snappy = 1, From 5fea5977770939a68c6f898bda3430f819e91a27 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:08:54 +1300 Subject: [PATCH 13/64] [enum] score_packet_type.rs --- .../version/v662/enums/score_packet_type.rs | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/crates/proto/src/version/v662/enums/score_packet_type.rs b/crates/proto/src/version/v662/enums/score_packet_type.rs index af5272f8..ba587902 100644 --- a/crates/proto/src/version/v662/enums/score_packet_type.rs +++ b/crates/proto/src/version/v662/enums/score_packet_type.rs @@ -1,7 +1,36 @@ use bedrockrs_macros::ProtoCodec; +use crate::version::v662::enums::IdentityDefinition; +use crate::version::v662::types::ScoreboardId; #[derive(ProtoCodec)] +struct ScorePacketInfoChangeEntry { + pub id: ScoreboardId, + pub objective_name: String, + #[endianness(le)] + pub score_value: i32, +} + +#[derive(ProtoCodec)] +struct ScorePacketInfoRemoveEntry { + pub id: ScoreboardId, + pub objective_name: String, + #[endianness(le)] + pub score_value: i32, + pub identity_definition_type: IdentityDefinition::Type, +} + +#[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] pub enum ScorePacketType { - Change = 0, - Remove = 1, + Change { + #[vec_repr(u32)] + #[vec_endianness(var)] + score_packet_info: Vec, + } = 0, + Remove { + #[vec_repr(u32)] + #[vec_endianness(var)] + score_packet_info: Vec, + } = 1, } \ No newline at end of file From 99abc339a03105933fc4272312a9257844874121 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:00 +1300 Subject: [PATCH 14/64] [enum] scoreboard_identity_packet_type.rs --- .../enums/scoreboard_identity_packet_type.rs | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/crates/proto/src/version/v662/enums/scoreboard_identity_packet_type.rs b/crates/proto/src/version/v662/enums/scoreboard_identity_packet_type.rs index 6f135f02..6009e456 100644 --- a/crates/proto/src/version/v662/enums/scoreboard_identity_packet_type.rs +++ b/crates/proto/src/version/v662/enums/scoreboard_identity_packet_type.rs @@ -1,7 +1,25 @@ use bedrockrs_macros::ProtoCodec; +use crate::version::v662::types::ScoreboardId; #[derive(ProtoCodec)] +struct IdentityInfoUpdateEntry { + pub scoreboard_id: ScoreboardId, + #[endianness(var)] + pub player_unique_id: i64, +} + +#[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] pub enum ScoreboardIdentityPacketType { - Update = 0, - Remove = 1, + Update { + #[vec_repr(u32)] + #[vec_endianness(var)] + identity_info: Vec, + } = 0, + Remove { + #[vec_repr(u32)] + #[vec_endianness(var)] + identity_info: Vec, + } = 1, } \ No newline at end of file From 770ada5820aa67f09f44d12f3d096cc51bf04741 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:06 +1300 Subject: [PATCH 15/64] [enum] soft_enum_update_type.rs --- crates/proto/src/version/v662/enums/soft_enum_update_type.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/proto/src/version/v662/enums/soft_enum_update_type.rs b/crates/proto/src/version/v662/enums/soft_enum_update_type.rs index 93015862..1cc8a3ec 100644 --- a/crates/proto/src/version/v662/enums/soft_enum_update_type.rs +++ b/crates/proto/src/version/v662/enums/soft_enum_update_type.rs @@ -1,6 +1,9 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(u32)] +#[enum_endianness(le)] +#[repr(u32)] pub enum SoftEnumUpdateType { Add = 0, Remove = 1, From 3e23d45843fbb78d0b338be5827dc87deba7a4cc Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:14 +1300 Subject: [PATCH 16/64] [enum] structure_template_request_operation.rs --- .../version/v662/enums/structure_template_request_operation.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/proto/src/version/v662/enums/structure_template_request_operation.rs b/crates/proto/src/version/v662/enums/structure_template_request_operation.rs index a499c714..dbbde2be 100644 --- a/crates/proto/src/version/v662/enums/structure_template_request_operation.rs +++ b/crates/proto/src/version/v662/enums/structure_template_request_operation.rs @@ -1,6 +1,8 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] pub enum StructureTemplateRequestOperation { None = 0, ExportFromSaveMode = 1, From a2ef237c6908b400783392a1a2ef7030b6005780 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:19 +1300 Subject: [PATCH 17/64] [enum] structure_template_response_type.rs --- .../src/version/v662/enums/structure_template_response_type.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/proto/src/version/v662/enums/structure_template_response_type.rs b/crates/proto/src/version/v662/enums/structure_template_response_type.rs index ad1bfee5..dd3433ff 100644 --- a/crates/proto/src/version/v662/enums/structure_template_response_type.rs +++ b/crates/proto/src/version/v662/enums/structure_template_response_type.rs @@ -1,6 +1,8 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] pub enum StructureTemplateResponseType { None = 0, Export = 1, From d582a1ada3a4f7e7eacd795b41b321c64d7a1e17 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:27 +1300 Subject: [PATCH 18/64] [enum] text_processing_event_origin.rs --- .../src/version/v662/enums/text_processing_event_origin.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/proto/src/version/v662/enums/text_processing_event_origin.rs b/crates/proto/src/version/v662/enums/text_processing_event_origin.rs index a3e136dc..02403382 100644 --- a/crates/proto/src/version/v662/enums/text_processing_event_origin.rs +++ b/crates/proto/src/version/v662/enums/text_processing_event_origin.rs @@ -1,6 +1,9 @@ use bedrockrs_macros::ProtoCodec; #[derive(ProtoCodec)] +#[enum_repr(i32)] +#[enum_endianness(le)] +#[repr(i32)] pub enum TextProcessingEventOrigin { Unknown = -1, ServerChatPublic = 0, From 7460ccd4f4ff613d832df2f64245ec2652c83759 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:36 +1300 Subject: [PATCH 19/64] [packet] anvil_damage.rs --- crates/proto/src/version/v662/packets/anvil_damage.rs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/anvil_damage.rs diff --git a/crates/proto/src/version/v662/packets/anvil_damage.rs b/crates/proto/src/version/v662/packets/anvil_damage.rs new file mode 100644 index 00000000..378ed267 --- /dev/null +++ b/crates/proto/src/version/v662/packets/anvil_damage.rs @@ -0,0 +1,9 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::NetworkBlockPosition; + +#[gamepacket(id = 141)] +#[derive(ProtoCodec)] +pub struct AnvilDamagePacket { + pub damage_amount: i8, + pub block_position: NetworkBlockPosition, +} \ No newline at end of file From 6b8d2d9a1f4ada66158ea5a7aab6070dbc5913fb Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:41 +1300 Subject: [PATCH 20/64] [packet] available_actor_identifiers.rs --- .../version/v662/packets/available_actor_identifiers.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/available_actor_identifiers.rs diff --git a/crates/proto/src/version/v662/packets/available_actor_identifiers.rs b/crates/proto/src/version/v662/packets/available_actor_identifiers.rs new file mode 100644 index 00000000..6a1a4464 --- /dev/null +++ b/crates/proto/src/version/v662/packets/available_actor_identifiers.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::CompoundTag; + +#[gamepacket(id = 119)] +#[derive(ProtoCodec)] +pub struct AvailableActorIdentifiersPacket { + pub actor_info_list: CompoundTag, +} \ No newline at end of file From a303a0760a618e17526965b39e4e167947517772 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:47 +1300 Subject: [PATCH 21/64] [packet] biome_definition_list.rs --- .../src/version/v662/packets/biome_definition_list.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/biome_definition_list.rs diff --git a/crates/proto/src/version/v662/packets/biome_definition_list.rs b/crates/proto/src/version/v662/packets/biome_definition_list.rs new file mode 100644 index 00000000..ed59c3c7 --- /dev/null +++ b/crates/proto/src/version/v662/packets/biome_definition_list.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::CompoundTag; + +#[gamepacket(id = 122)] +#[derive(ProtoCodec)] +pub struct BiomeDefinitionListPacket { + pub biome_definition_data: CompoundTag, +} \ No newline at end of file From d3931f60f35b33a002b1156adb895e44e5df240e Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:54 +1300 Subject: [PATCH 22/64] [packet] client_cache_blob_status.rs --- .../v662/packets/client_cache_blob_status.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/client_cache_blob_status.rs diff --git a/crates/proto/src/version/v662/packets/client_cache_blob_status.rs b/crates/proto/src/version/v662/packets/client_cache_blob_status.rs new file mode 100644 index 00000000..f75f1652 --- /dev/null +++ b/crates/proto/src/version/v662/packets/client_cache_blob_status.rs @@ -0,0 +1,14 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 135)] +#[derive(ProtoCodec)] +pub struct ClientCacheBlobStatusPacket { + #[vec_repr(u32)] + #[vec_endianness(var)] + pub missing_blobs: Vec, + #[vec_repr(u32)] + #[vec_endianness(var)] + pub obtained_blobs: Vec, +} + +// TODO: custom proto impl, both Vec lengths come first in packet, then both their elements, respectfully. (elements are le) \ No newline at end of file From f435028f291eb3410424a1c5e9b3253d93029b36 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:09:59 +1300 Subject: [PATCH 23/64] [packet] client_cache_miss_response.rs --- .../v662/packets/client_cache_miss_response.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/client_cache_miss_response.rs diff --git a/crates/proto/src/version/v662/packets/client_cache_miss_response.rs b/crates/proto/src/version/v662/packets/client_cache_miss_response.rs new file mode 100644 index 00000000..196a8076 --- /dev/null +++ b/crates/proto/src/version/v662/packets/client_cache_miss_response.rs @@ -0,0 +1,16 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[derive(ProtoCodec)] +struct MissingBlobEntry { + #[endianness(le)] + pub blob_id: u64, + pub blob_data: String, +} + +#[gamepacket(id = 136)] +#[derive(ProtoCodec)] +pub struct ClientCacheMissResponsePacket { + #[vec_repr(u32)] + #[vec_endianness(var)] + pub missing_blobs: Vec +} \ No newline at end of file From 2b939bbbc3bcb111b93ec46519e97f7ae3acc3f7 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:04 +1300 Subject: [PATCH 24/64] [packet] client_cache_status.rs --- .../proto/src/version/v662/packets/client_cache_status.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/client_cache_status.rs diff --git a/crates/proto/src/version/v662/packets/client_cache_status.rs b/crates/proto/src/version/v662/packets/client_cache_status.rs new file mode 100644 index 00000000..d985fb29 --- /dev/null +++ b/crates/proto/src/version/v662/packets/client_cache_status.rs @@ -0,0 +1,7 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 129)] +#[derive(ProtoCodec)] +pub struct ClientCacheStatusPacket { + pub is_cache_supported: bool, +} \ No newline at end of file From 64d5a57fde911bb8c5297a32b8dbe2962221a672 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:09 +1300 Subject: [PATCH 25/64] [packet] code_builder.rs --- crates/proto/src/version/v662/packets/code_builder.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/code_builder.rs diff --git a/crates/proto/src/version/v662/packets/code_builder.rs b/crates/proto/src/version/v662/packets/code_builder.rs new file mode 100644 index 00000000..657f7f28 --- /dev/null +++ b/crates/proto/src/version/v662/packets/code_builder.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 150)] +#[derive(ProtoCodec)] +pub struct CodeBuilderPacket { + pub url: String, + pub should_open_code_builder: bool, +} \ No newline at end of file From 879edf103112e73ccd2fabac96180c5b83fcaf58 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:15 +1300 Subject: [PATCH 26/64] [packet] completed_using_item.rs --- .../src/version/v662/packets/completed_using_item.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/completed_using_item.rs diff --git a/crates/proto/src/version/v662/packets/completed_using_item.rs b/crates/proto/src/version/v662/packets/completed_using_item.rs new file mode 100644 index 00000000..f2632efd --- /dev/null +++ b/crates/proto/src/version/v662/packets/completed_using_item.rs @@ -0,0 +1,10 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::ItemUseMethod; + +#[gamepacket(id = 142)] +#[derive(ProtoCodec)] +pub struct CompletedUsingItemPacket { + #[endianness(le)] + pub item_id: u16, + pub item_use_method: ItemUseMethod, +} \ No newline at end of file From 40b26fc3aa4e6778878a7948cdda11c49041f7d1 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:20 +1300 Subject: [PATCH 27/64] [packet] creative_content.rs --- .../version/v662/packets/creative_content.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/creative_content.rs diff --git a/crates/proto/src/version/v662/packets/creative_content.rs b/crates/proto/src/version/v662/packets/creative_content.rs new file mode 100644 index 00000000..d6bef00e --- /dev/null +++ b/crates/proto/src/version/v662/packets/creative_content.rs @@ -0,0 +1,17 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::NetworkItemInstanceDescriptor; + +#[derive(ProtoCodec)] +struct WriteEntry { + #[endianness(var)] + pub creative_net_id: u32, + pub item_instance: NetworkItemInstanceDescriptor, +} + +#[gamepacket(id = 145)] +#[derive(ProtoCodec)] +pub struct CreativeContentPacket { + #[vec_repr(u32)] + #[vec_endianness(var)] + pub write_entries: Vec +} \ No newline at end of file From 99bf0ae126372699da5db5e0d4d797cffc025067 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:27 +1300 Subject: [PATCH 28/64] [packet] education_settings.rs --- .../proto/src/version/v662/packets/education_settings.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/education_settings.rs diff --git a/crates/proto/src/version/v662/packets/education_settings.rs b/crates/proto/src/version/v662/packets/education_settings.rs new file mode 100644 index 00000000..bf65857b --- /dev/null +++ b/crates/proto/src/version/v662/packets/education_settings.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::EducationLevelSettings; + +#[gamepacket(id = 137)] +#[derive(ProtoCodec)] +pub struct EducationSettingsPacket { + pub education_level_settings: EducationLevelSettings, +} \ No newline at end of file From 29b2d9f940823e9bd2ec478c556056e1f9597229 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:32 +1300 Subject: [PATCH 29/64] [packet] emote.rs --- .../proto/src/version/v662/packets/emote.rs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/emote.rs diff --git a/crates/proto/src/version/v662/packets/emote.rs b/crates/proto/src/version/v662/packets/emote.rs new file mode 100644 index 00000000..057aa4fc --- /dev/null +++ b/crates/proto/src/version/v662/packets/emote.rs @@ -0,0 +1,20 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::ActorRuntimeID; + +#[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] +enum Flags { + ServerSide = 1 << 0, + MuteEmoteChat = 1 << 1, +} + +#[gamepacket(id = 138)] +#[derive(ProtoCodec)] +pub struct EmotePacket { + pub actor_runtime_id: ActorRuntimeID, + pub emote_id: String, + pub xuid: String, + pub platform_id: String, + pub flags: Flags, +} \ No newline at end of file From f1b6dc2a617da854c29900924144aa3669a3a775 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:38 +1300 Subject: [PATCH 30/64] [packet] item_stack_request.rs --- .../v662/packets/item_stack_request.rs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/item_stack_request.rs diff --git a/crates/proto/src/version/v662/packets/item_stack_request.rs b/crates/proto/src/version/v662/packets/item_stack_request.rs new file mode 100644 index 00000000..9857215e --- /dev/null +++ b/crates/proto/src/version/v662/packets/item_stack_request.rs @@ -0,0 +1,32 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::{ItemStackRequestActionType, TextProcessingEventOrigin}; +use crate::version::v662::types::ItemStackRequestSlotInfo; + +#[derive(ProtoCodec)] +struct ActionsEntry { + pub action_type: ItemStackRequestActionType, + pub amount: i8, + pub source: ItemStackRequestSlotInfo, + pub destination: ItemStackRequestSlotInfo, +} + +#[derive(ProtoCodec)] +struct RequestsEntry { + #[endianness(var)] + pub client_request_id: u32, + #[vec_repr(u32)] + #[vec_endianness(var)] + pub actions: Vec, + #[vec_repr(u32)] + #[vec_endianness(var)] + pub strings_to_filter: Vec, + pub strings_to_filter_origin: TextProcessingEventOrigin, +} + +#[gamepacket(id = 147)] +#[derive(ProtoCodec)] +pub struct ItemStackRequestPacket { + #[vec_repr(u32)] + #[vec_endianness(var)] + pub requests: Vec, +} \ No newline at end of file From bf671baf9a2536dc8264135c9a0d5c3aa34657a8 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:43 +1300 Subject: [PATCH 31/64] [packet] item_stack_response.rs --- .../src/version/v662/packets/item_stack_response.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/item_stack_response.rs diff --git a/crates/proto/src/version/v662/packets/item_stack_response.rs b/crates/proto/src/version/v662/packets/item_stack_response.rs new file mode 100644 index 00000000..3365e249 --- /dev/null +++ b/crates/proto/src/version/v662/packets/item_stack_response.rs @@ -0,0 +1,10 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::ItemStackResponseInfo; + +#[gamepacket(id = 148)] +#[derive(ProtoCodec)] +pub struct ItemStackResponsePacket { + #[vec_repr(u32)] + #[vec_endianness(var)] + pub responses: Vec +} \ No newline at end of file From 356079f5e5f155be91ecd6cd1da7cb324ddb72bf Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:50 +1300 Subject: [PATCH 32/64] [packet] lab_table.rs --- .../src/version/v662/packets/lab_table.rs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/lab_table.rs diff --git a/crates/proto/src/version/v662/packets/lab_table.rs b/crates/proto/src/version/v662/packets/lab_table.rs new file mode 100644 index 00000000..a4af1ecb --- /dev/null +++ b/crates/proto/src/version/v662/packets/lab_table.rs @@ -0,0 +1,20 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::LabTableReactionType; +use crate::version::v662::types::BlockPos; + +#[derive(ProtoCodec)] +#[enum_repr(i8)] +#[repr(i8)] +enum Type { + StartCombine = 0, + StartReaction = 1, + Reset = 2, +} + +#[gamepacket(id = 109)] +#[derive(ProtoCodec)] +pub struct LabTablePacket { + pub lab_table_packet_type: Type, + pub position: BlockPos, + pub reaction: LabTableReactionType, +} \ No newline at end of file From 858f57def877e5a57c23a85c8de1700fbb244eb2 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:10:55 +1300 Subject: [PATCH 33/64] [packet] lectern_update.rs --- .../proto/src/version/v662/packets/lectern_update.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/lectern_update.rs diff --git a/crates/proto/src/version/v662/packets/lectern_update.rs b/crates/proto/src/version/v662/packets/lectern_update.rs new file mode 100644 index 00000000..cbd58881 --- /dev/null +++ b/crates/proto/src/version/v662/packets/lectern_update.rs @@ -0,0 +1,10 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::NetworkBlockPosition; + +#[gamepacket(id = 125)] +#[derive(ProtoCodec)] +pub struct LecternUpdatePacket { + pub new_page_to_show: i8, + pub total_pages: i8, + pub position_of_lectern_to_update: NetworkBlockPosition, +} \ No newline at end of file From c12d34516ad49583f41115f3268cf3cf759d8c5b Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:02 +1300 Subject: [PATCH 34/64] [packet] level_event_generic.rs --- .../src/version/v662/packets/level_event_generic.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/level_event_generic.rs diff --git a/crates/proto/src/version/v662/packets/level_event_generic.rs b/crates/proto/src/version/v662/packets/level_event_generic.rs new file mode 100644 index 00000000..2040fe09 --- /dev/null +++ b/crates/proto/src/version/v662/packets/level_event_generic.rs @@ -0,0 +1,10 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::LevelEvent; +use crate::version::v662::types::CompoundTag; + +#[gamepacket(id = 124)] +#[derive(ProtoCodec)] +pub struct LevelEventGenericPacket { + pub event_id: LevelEvent, + pub event_data: CompoundTag, +} \ No newline at end of file From b47e5564b1f29a907c15872cdc34c55e1d0e3836 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:07 +1300 Subject: [PATCH 35/64] [packet] level_sound_event.rs --- .../src/version/v662/packets/level_sound_event.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/level_sound_event.rs diff --git a/crates/proto/src/version/v662/packets/level_sound_event.rs b/crates/proto/src/version/v662/packets/level_sound_event.rs new file mode 100644 index 00000000..cc0d4eba --- /dev/null +++ b/crates/proto/src/version/v662/packets/level_sound_event.rs @@ -0,0 +1,15 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::Puv; +use crate::version::v662::types::Vec3; + +#[gamepacket(id = 123)] +#[derive(ProtoCodec)] +pub struct LevelSoundEventPacket { + pub event_id: Puv::Legacy::LevelSoundEvent, + pub position: Vec3, + #[endianness(var)] + pub data: i32, + pub actor_identifier: String, + pub is_baby_mob: bool, + pub is_global: bool, +} \ No newline at end of file From 059129695bb5014bd2e7ce5e5188128a89d68483 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:13 +1300 Subject: [PATCH 36/64] [packet] level_sound_event_v2.rs --- .../v662/packets/level_sound_event_v2.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/level_sound_event_v2.rs diff --git a/crates/proto/src/version/v662/packets/level_sound_event_v2.rs b/crates/proto/src/version/v662/packets/level_sound_event_v2.rs new file mode 100644 index 00000000..fd03e62f --- /dev/null +++ b/crates/proto/src/version/v662/packets/level_sound_event_v2.rs @@ -0,0 +1,17 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::Puv; +use crate::version::v662::types::Vec3; + +#[gamepacket(id = 120)] +#[derive(ProtoCodec)] +pub struct LevelSoundEventPacketV2 { + pub event_id: Puv::Legacy::LevelSoundEvent, // TODO: listed as byte, enum is unsigned varint + pub position: Vec3, + #[endianness(var)] + pub data: i32, + pub actor_identifier: String, + pub baby_mod: bool, + pub global: bool, +} + +// TODO: custom proto impl because of that stupid enum \ No newline at end of file From 1b1560d28baebb219c24f7e19f4364fcbe4ed56e Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:18 +1300 Subject: [PATCH 37/64] [packet] map_create_locked_copy.rs --- .../src/version/v662/packets/map_create_locked_copy.rs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/map_create_locked_copy.rs diff --git a/crates/proto/src/version/v662/packets/map_create_locked_copy.rs b/crates/proto/src/version/v662/packets/map_create_locked_copy.rs new file mode 100644 index 00000000..5da09942 --- /dev/null +++ b/crates/proto/src/version/v662/packets/map_create_locked_copy.rs @@ -0,0 +1,9 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::ActorUniqueID; + +#[gamepacket(id = 131)] +#[derive(ProtoCodec)] +pub struct MapCreateLockedCopyPacket { + pub original_map_id: ActorUniqueID, + pub new_map_id: ActorUniqueID, +} \ No newline at end of file From bd5561b65c51512e087e37e16e34e22e9b096caf Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:24 +1300 Subject: [PATCH 38/64] [packet] mod.rs --- crates/proto/src/version/v662/packets/mod.rs | 46 +++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/crates/proto/src/version/v662/packets/mod.rs b/crates/proto/src/version/v662/packets/mod.rs index 1d9585f6..d0fb6f62 100644 --- a/crates/proto/src/version/v662/packets/mod.rs +++ b/crates/proto/src/version/v662/packets/mod.rs @@ -100,4 +100,48 @@ export!(set_last_hurt_by); export!(book_edit); export!(npc_request); export!(photo_transfer); -export!(modal_form_request); \ No newline at end of file +export!(modal_form_request); +export!(modal_form_response); +export!(server_settings_request); +export!(server_settings_response); +export!(show_profile); +export!(set_default_game_type); +export!(remove_objective); +export!(set_display_objective); +export!(set_score); +export!(lab_table); +export!(update_block_synced); +export!(move_actor_delta); +export!(set_scoreboard_identity); +export!(set_local_player_as_initialized); +export!(update_soft_enum); +export!(network_stack_latency); +export!(spawn_particle_effect); +export!(available_actor_identifiers); +export!(level_sound_event_v2); +export!(network_chunk_publisher_update); +export!(biome_definition_list); +export!(level_sound_event); +export!(level_event_generic); +export!(lectern_update); +export!(client_cache_status); +export!(on_screen_texture_animation); +export!(map_create_locked_copy); +export!(structure_data_request); +export!(structure_data_response); +export!(client_cache_blob_status); +export!(client_cache_miss_response); +export!(education_settings); +export!(emote); +export!(multiplayer_settings); +export!(settings_command); +export!(anvil_damage); +export!(completed_using_item); +export!(network_settings); +export!(player_auth_input); +export!(creative_content); +export!(player_enchant_options); +export!(item_stack_request); +export!(item_stack_response); +export!(player_armor_damage); +export!(code_builder); \ No newline at end of file From 5467225a968b7bc8ba24bc47a8d38cf2f539652f Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:30 +1300 Subject: [PATCH 39/64] [packet] modal_form_response.rs --- .../src/version/v662/packets/modal_form_response.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/modal_form_response.rs diff --git a/crates/proto/src/version/v662/packets/modal_form_response.rs b/crates/proto/src/version/v662/packets/modal_form_response.rs new file mode 100644 index 00000000..cb1ab95d --- /dev/null +++ b/crates/proto/src/version/v662/packets/modal_form_response.rs @@ -0,0 +1,11 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::ModalFormCancelReason; + +#[gamepacket(id = 101)] +#[derive(ProtoCodec)] +pub struct ModalFormResponsePacket { + #[endianness(var)] + pub form_id: u32, + pub json_response: Option, // TODO: might not be string, dumb proto docs list this as std::optional + pub form_cancel_reason: Option // TODO: enum_repr +} \ No newline at end of file From 65416ad174e7e8de53cf38d97304285d91943651 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:35 +1300 Subject: [PATCH 40/64] [packet] move_actor_delta.rs --- crates/proto/src/version/v662/packets/move_actor_delta.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/move_actor_delta.rs diff --git a/crates/proto/src/version/v662/packets/move_actor_delta.rs b/crates/proto/src/version/v662/packets/move_actor_delta.rs new file mode 100644 index 00000000..43eac30c --- /dev/null +++ b/crates/proto/src/version/v662/packets/move_actor_delta.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::MoveActorDeltaData; + +#[gamepacket(id = 111)] +#[derive(ProtoCodec)] +pub struct MoveActorDeltaPacket { + pub move_data: MoveActorDeltaData, +} \ No newline at end of file From 9c2ab1b297e7e6d2cabe8dd2a82d0700103892f9 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:42 +1300 Subject: [PATCH 41/64] [packet] multiplayer_settings.rs --- .../src/version/v662/packets/multiplayer_settings.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/multiplayer_settings.rs diff --git a/crates/proto/src/version/v662/packets/multiplayer_settings.rs b/crates/proto/src/version/v662/packets/multiplayer_settings.rs new file mode 100644 index 00000000..539053ef --- /dev/null +++ b/crates/proto/src/version/v662/packets/multiplayer_settings.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::MultiplayerSettingsPacketType; + +#[gamepacket(id = 139)] +#[derive(ProtoCodec)] +pub struct MultiplayerSettingsPacket { + pub multiplayer_settings_packet_type: MultiplayerSettingsPacketType, +} \ No newline at end of file From c573ea14c0f8acfcd058a2c2bd9f31f1c8030505 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:50 +1300 Subject: [PATCH 42/64] [packet] network_chunk_publisher_update.rs --- .../packets/network_chunk_publisher_update.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/network_chunk_publisher_update.rs diff --git a/crates/proto/src/version/v662/packets/network_chunk_publisher_update.rs b/crates/proto/src/version/v662/packets/network_chunk_publisher_update.rs new file mode 100644 index 00000000..77e74b07 --- /dev/null +++ b/crates/proto/src/version/v662/packets/network_chunk_publisher_update.rs @@ -0,0 +1,15 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::{BlockPos, ChunkPos}; + +#[gamepacket(id = 121)] +#[derive(ProtoCodec)] +pub struct NetworkChunkPublisherUpdatePacket { + pub new_view_position: BlockPos, + #[endianness(var)] + pub new_view_radius: u32, + #[endianness(le)] + pub server_built_chunks_size: u32, + #[vec_repr(u32)] + #[vec_endianness(var)] + pub server_built_chunks_list: Vec +} \ No newline at end of file From 61bd683760a20e790b71acfb4696a519e0ecfef5 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:11:55 +1300 Subject: [PATCH 43/64] [packet] network_settings.rs --- .../src/version/v662/packets/network_settings.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/network_settings.rs diff --git a/crates/proto/src/version/v662/packets/network_settings.rs b/crates/proto/src/version/v662/packets/network_settings.rs new file mode 100644 index 00000000..538f12a0 --- /dev/null +++ b/crates/proto/src/version/v662/packets/network_settings.rs @@ -0,0 +1,14 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::PacketCompressionAlgorithm; + +#[gamepacket(id = 143)] +#[derive(ProtoCodec)] +pub struct NetworkSettingsPacket { + #[endianness(le)] + pub compression_threshold: u16, + pub compression_algorithm: PacketCompressionAlgorithm, + pub client_throttle_enabled: bool, + pub client_throttle_threshold: i8, + #[endianness(le)] + pub client_throttle_scalar: f32, +} \ No newline at end of file From 0aef42a02ea7461496b9de8943b546a5cfe5576c Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:00 +1300 Subject: [PATCH 44/64] [packet] network_stack_latency.rs --- .../src/version/v662/packets/network_stack_latency.rs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/network_stack_latency.rs diff --git a/crates/proto/src/version/v662/packets/network_stack_latency.rs b/crates/proto/src/version/v662/packets/network_stack_latency.rs new file mode 100644 index 00000000..1fc54d1b --- /dev/null +++ b/crates/proto/src/version/v662/packets/network_stack_latency.rs @@ -0,0 +1,9 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 115)] +#[derive(ProtoCodec)] +pub struct NetworkStackLatencyPacket { + #[endianness(le)] + pub creation_time: u64, + pub is_from_server: bool, +} \ No newline at end of file From e516dc8ddbcb1a07fccb83c383bedb44a83c927e Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:06 +1300 Subject: [PATCH 45/64] [packet] on_screen_texture_animation.rs --- .../version/v662/packets/on_screen_texture_animation.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/on_screen_texture_animation.rs diff --git a/crates/proto/src/version/v662/packets/on_screen_texture_animation.rs b/crates/proto/src/version/v662/packets/on_screen_texture_animation.rs new file mode 100644 index 00000000..7ef1b699 --- /dev/null +++ b/crates/proto/src/version/v662/packets/on_screen_texture_animation.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 130)] +#[derive(ProtoCodec)] +pub struct OnScreenTextureAnimationPacket { + #[endianness(le)] + pub effect_id: u32, +} \ No newline at end of file From 0a9aac8dc0a881515bdd9f6cb128b899492d23e8 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:13 +1300 Subject: [PATCH 46/64] [packet] player_armor_damage.rs --- .../src/version/v662/packets/player_armor_damage.rs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/player_armor_damage.rs diff --git a/crates/proto/src/version/v662/packets/player_armor_damage.rs b/crates/proto/src/version/v662/packets/player_armor_damage.rs new file mode 100644 index 00000000..2728bb45 --- /dev/null +++ b/crates/proto/src/version/v662/packets/player_armor_damage.rs @@ -0,0 +1,9 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 149)] +#[derive(ProtoCodec)] +pub struct PlayerArmorDamagePacket { + pub slot_bitset: i8, + #[endianness(var)] + pub damage: i32, +} \ No newline at end of file From 07fbbf306bae215dc8ca7b56b2c25a5308e345e1 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:19 +1300 Subject: [PATCH 47/64] [packet] player_auth_input.rs --- .../version/v662/packets/player_auth_input.rs | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/player_auth_input.rs diff --git a/crates/proto/src/version/v662/packets/player_auth_input.rs b/crates/proto/src/version/v662/packets/player_auth_input.rs new file mode 100644 index 00000000..ec842bee --- /dev/null +++ b/crates/proto/src/version/v662/packets/player_auth_input.rs @@ -0,0 +1,54 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::{ClientPlayMode, InputMode, ItemStackRequestActionType, NewInteractionModel, TextProcessingEventOrigin}; +use crate::version::v662::types::{ActorUniqueID, ItemStackRequestSlotInfo, PackedItemUseLegacyInventoryTransaction, PlayerBlockActions, Vec2, Vec3}; + +#[derive(ProtoCodec)] +struct ActionsEntry { + pub action_type: ItemStackRequestActionType, + pub amount: i8, + pub source: ItemStackRequestSlotInfo, + pub destination: ItemStackRequestSlotInfo, +} + +#[derive(ProtoCodec)] +struct PerformItemStackRequestData { + #[endianness(var)] + pub client_request_id: u32, + #[vec_repr(u32)] + #[vec_endianness(var)] + pub actions: Vec, + #[vec_repr(u32)] + #[vec_endianness(var)] + pub strings_to_filter: Vec, + pub strings_to_filter_origin: TextProcessingEventOrigin, +} + +#[derive(ProtoCodec)] +struct ClientPredictedVehicleData { + pub vehicle_rotation: Vec2, + pub client_predicted_vehicle: ActorUniqueID, +} + +#[gamepacket(id = 144)] +#[derive(ProtoCodec)] +pub struct PlayerAuthInputPacket { + pub player_rotation: Vec2, + pub player_position: Vec3, + pub move_vector: Vec3, + #[endianness(le)] + pub player_head_rotation: f32, + #[endianness(var)] + pub input_data: u64, + pub input_mode: InputMode, + pub play_mode: ClientPlayMode, + pub new_interaction_model: NewInteractionModel, + pub vr_gaze_direction: Option, // TODO: custom proto impl, this is added if play_mode == ClientPlayMode::Reality + #[endianness(var)] + pub client_tick: u64, + pub velocity: Vec3, + pub item_use_transaction: Option, // TODO: custom proto, added if input_data has PlayerAuthInputPacket::InputData::PerformItemInteraction set. + pub item_stack_request: Option, // TODO: custom proto, added if input data has PlayerAuthInputPacket::InputData::PerformItemStackRequest set. + pub player_block_actions: Option, // TODO: custom proto, added if input data has PlayerAuthInputPacket::InputData::PerformBlockActions set. + pub client_predicted_vehicle: Option, // TODO: custom proto, added if input data has PlayerAuthInputPacket::InputData::IsInClientPredictedVehicle set. + pub analog_move_vector: Vec2, +} \ No newline at end of file From 6b9a9963a9111dfb09538c52f78f5f16c78d4076 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:24 +1300 Subject: [PATCH 48/64] [packet] player_enchant_options.rs --- .../v662/packets/player_enchant_options.rs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/player_enchant_options.rs diff --git a/crates/proto/src/version/v662/packets/player_enchant_options.rs b/crates/proto/src/version/v662/packets/player_enchant_options.rs new file mode 100644 index 00000000..0be953cd --- /dev/null +++ b/crates/proto/src/version/v662/packets/player_enchant_options.rs @@ -0,0 +1,20 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::ItemEnchants; + +#[derive(ProtoCodec)] +struct OptionsEntry { + #[endianness(var)] + pub cost: u32, + pub enchants: ItemEnchants, + pub enchant_name: String, + #[endianness(var)] + pub enchant_net_id: u32, +} + +#[gamepacket(id = 146)] +#[derive(ProtoCodec)] +pub struct PlayerEnchantOptionsPacket { + #[vec_repr(u32)] + #[vec_endianness(var)] + pub options: Vec, +} \ No newline at end of file From c5e99b22d37c57f531048d9bf782692dcc0efb74 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:30 +1300 Subject: [PATCH 49/64] [packet] remove_objective.rs --- crates/proto/src/version/v662/packets/remove_objective.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/remove_objective.rs diff --git a/crates/proto/src/version/v662/packets/remove_objective.rs b/crates/proto/src/version/v662/packets/remove_objective.rs new file mode 100644 index 00000000..cb7a0524 --- /dev/null +++ b/crates/proto/src/version/v662/packets/remove_objective.rs @@ -0,0 +1,7 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 106)] +#[derive(ProtoCodec)] +pub struct RemoveObjectivePacket { + pub objective_name: String, +} \ No newline at end of file From cdce6eb167afb92b3d253721be0190486e254dc0 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:37 +1300 Subject: [PATCH 50/64] [packet] server_settings_request.rs --- .../src/version/v662/packets/server_settings_request.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/server_settings_request.rs diff --git a/crates/proto/src/version/v662/packets/server_settings_request.rs b/crates/proto/src/version/v662/packets/server_settings_request.rs new file mode 100644 index 00000000..d72abd9b --- /dev/null +++ b/crates/proto/src/version/v662/packets/server_settings_request.rs @@ -0,0 +1,5 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 102)] +#[derive(ProtoCodec)] +pub struct ServerSettingsRequestPacket {} \ No newline at end of file From 69e0c2ba0ba92c583c3ffeecadf5e541871b4125 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:44 +1300 Subject: [PATCH 51/64] [packet] server_settings_response.rs --- .../version/v662/packets/server_settings_response.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/server_settings_response.rs diff --git a/crates/proto/src/version/v662/packets/server_settings_response.rs b/crates/proto/src/version/v662/packets/server_settings_response.rs new file mode 100644 index 00000000..dec5cc11 --- /dev/null +++ b/crates/proto/src/version/v662/packets/server_settings_response.rs @@ -0,0 +1,11 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 103)] +#[derive(ProtoCodec)] +pub struct ServerSettingsResponsePacket { + #[endianness(var)] + pub form_id: u32, + pub form_ui_json: String, +} + +// TODO: this doesn't seem right. Probably an error in the proto docs. Check gopher or cloudburst \ No newline at end of file From 6634618beef37eabe58bb14763d1373ba34784a8 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:53 +1300 Subject: [PATCH 52/64] [packet] set_default_game_type.rs --- .../src/version/v662/packets/set_default_game_type.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/set_default_game_type.rs diff --git a/crates/proto/src/version/v662/packets/set_default_game_type.rs b/crates/proto/src/version/v662/packets/set_default_game_type.rs new file mode 100644 index 00000000..02b445d8 --- /dev/null +++ b/crates/proto/src/version/v662/packets/set_default_game_type.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::GameType; + +#[gamepacket(id = 105)] +#[derive(ProtoCodec)] +pub struct SetDefaultGameTypePacket { + pub default_game_type: GameType, +} \ No newline at end of file From 8da2138071a9b726ade52e1b992adf05340041b4 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:12:59 +1300 Subject: [PATCH 53/64] [packet] set_display_objective.rs --- .../version/v662/packets/set_display_objective.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/set_display_objective.rs diff --git a/crates/proto/src/version/v662/packets/set_display_objective.rs b/crates/proto/src/version/v662/packets/set_display_objective.rs new file mode 100644 index 00000000..cde0bf0a --- /dev/null +++ b/crates/proto/src/version/v662/packets/set_display_objective.rs @@ -0,0 +1,12 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::ObjectiveSortOrder; + +#[gamepacket(id = 107)] +#[derive(ProtoCodec)] +pub struct SetDisplayObjectivePacket { + pub display_slot_name: String, + pub objective_name: String, + pub objective_display_name: String, + pub criteria_name: String, + pub sort_order: ObjectiveSortOrder, +} \ No newline at end of file From bc0f7d22c2c72f096178b63892a57a656465e22e Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:06 +1300 Subject: [PATCH 54/64] [packet] set_local_player_as_initialized.rs --- .../v662/packets/set_local_player_as_initialized.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/set_local_player_as_initialized.rs diff --git a/crates/proto/src/version/v662/packets/set_local_player_as_initialized.rs b/crates/proto/src/version/v662/packets/set_local_player_as_initialized.rs new file mode 100644 index 00000000..b0ff6804 --- /dev/null +++ b/crates/proto/src/version/v662/packets/set_local_player_as_initialized.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::ActorRuntimeID; + +#[gamepacket(id = 113)] +#[derive(ProtoCodec)] +pub struct SetLocalPlayerAsInitializedPacket { + pub player_id: ActorRuntimeID, +} \ No newline at end of file From 4dcdedbac0eadc2118fd8d1db0127b710af3d066 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:13 +1300 Subject: [PATCH 55/64] [packet] set_score.rs --- crates/proto/src/version/v662/packets/set_score.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/set_score.rs diff --git a/crates/proto/src/version/v662/packets/set_score.rs b/crates/proto/src/version/v662/packets/set_score.rs new file mode 100644 index 00000000..b9a842a2 --- /dev/null +++ b/crates/proto/src/version/v662/packets/set_score.rs @@ -0,0 +1,10 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::ScorePacketType; + +#[gamepacket(id = 108)] +#[derive(ProtoCodec)] +pub struct SetScorePacket { + pub score_packet_type: ScorePacketType, +} + +// TODO: this kinda sucks, might wanna refactor later \ No newline at end of file From 8989c8b41a0964220209ac8d647096be0e0c8fa5 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:18 +1300 Subject: [PATCH 56/64] [packet] set_scoreboard_identity.rs --- .../version/v662/packets/set_scoreboard_identity.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/set_scoreboard_identity.rs diff --git a/crates/proto/src/version/v662/packets/set_scoreboard_identity.rs b/crates/proto/src/version/v662/packets/set_scoreboard_identity.rs new file mode 100644 index 00000000..a49a762b --- /dev/null +++ b/crates/proto/src/version/v662/packets/set_scoreboard_identity.rs @@ -0,0 +1,10 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::ScoreboardIdentityPacketType; + +#[gamepacket(id = 112)] +#[derive(ProtoCodec)] +pub struct SetScoreboardIdentityPacket { + pub scoreboard_identity_packet_type: ScoreboardIdentityPacketType, +} + +// TODO: same thing here, scoreboard seem to be a bit janky. Might refactor \ No newline at end of file From 2369f431397d29cf878fe081bb5bfbd15d928c80 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:25 +1300 Subject: [PATCH 57/64] [packet] settings_command.rs --- crates/proto/src/version/v662/packets/settings_command.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/settings_command.rs diff --git a/crates/proto/src/version/v662/packets/settings_command.rs b/crates/proto/src/version/v662/packets/settings_command.rs new file mode 100644 index 00000000..83dc7120 --- /dev/null +++ b/crates/proto/src/version/v662/packets/settings_command.rs @@ -0,0 +1,8 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 140)] +#[derive(ProtoCodec)] +pub struct SettingsCommandPacket { + pub command: String, + pub suppress_output: bool, +} \ No newline at end of file From 6ccb62cbdeec9905c98bddee017a9b094d45d8ea Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:31 +1300 Subject: [PATCH 58/64] [packet] show_profile.rs --- crates/proto/src/version/v662/packets/show_profile.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/show_profile.rs diff --git a/crates/proto/src/version/v662/packets/show_profile.rs b/crates/proto/src/version/v662/packets/show_profile.rs new file mode 100644 index 00000000..13464ff5 --- /dev/null +++ b/crates/proto/src/version/v662/packets/show_profile.rs @@ -0,0 +1,7 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; + +#[gamepacket(id = 104)] +#[derive(ProtoCodec)] +pub struct ShowProfilePacket { + pub player_xuid: String, +} \ No newline at end of file From 76e16aac88df900fc249321c482b564ba45b1c03 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:37 +1300 Subject: [PATCH 59/64] [packet] spawn_particle_effect.rs --- .../version/v662/packets/spawn_particle_effect.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/spawn_particle_effect.rs diff --git a/crates/proto/src/version/v662/packets/spawn_particle_effect.rs b/crates/proto/src/version/v662/packets/spawn_particle_effect.rs new file mode 100644 index 00000000..5cfccf61 --- /dev/null +++ b/crates/proto/src/version/v662/packets/spawn_particle_effect.rs @@ -0,0 +1,12 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::types::{ActorUniqueID, MolangVariableMap, Vec3}; + +#[gamepacket(id = 118)] +#[derive(ProtoCodec)] +pub struct SpawnParticleEffectPacket { + pub dimension_id: i8, + pub actor_id: ActorUniqueID, + pub position: Vec3, + pub effect_name: String, + pub molang_variables: Option +} \ No newline at end of file From a5838d6f6d08bb4bfed6ce6a217b45dcab8c91a2 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:43 +1300 Subject: [PATCH 60/64] [packet] structure_data_request.rs --- .../version/v662/packets/structure_data_request.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/structure_data_request.rs diff --git a/crates/proto/src/version/v662/packets/structure_data_request.rs b/crates/proto/src/version/v662/packets/structure_data_request.rs new file mode 100644 index 00000000..bc1ad553 --- /dev/null +++ b/crates/proto/src/version/v662/packets/structure_data_request.rs @@ -0,0 +1,12 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::StructureTemplateRequestOperation; +use crate::version::v662::types::{NetworkBlockPosition, StructureSettings}; + +#[gamepacket(id = 132)] +#[derive(ProtoCodec)] +pub struct StructureDataRequestPacket { + pub structure_name: String, + pub structure_position: NetworkBlockPosition, + pub structure_settings: StructureSettings, + pub requested_operation: StructureTemplateRequestOperation, +} \ No newline at end of file From 0dc4df2cfced4d0dcf0df291c97704dc7c7544e5 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:47 +1300 Subject: [PATCH 61/64] [packet] structure_data_response.rs --- .../version/v662/packets/structure_data_response.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/structure_data_response.rs diff --git a/crates/proto/src/version/v662/packets/structure_data_response.rs b/crates/proto/src/version/v662/packets/structure_data_response.rs new file mode 100644 index 00000000..ec23ffee --- /dev/null +++ b/crates/proto/src/version/v662/packets/structure_data_response.rs @@ -0,0 +1,13 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::StructureTemplateResponseType; +use crate::version::v662::types::CompoundTag; + +#[gamepacket(id = 133)] +#[derive(ProtoCodec)] +pub struct StructureDataResponsePacket { + pub structure_name: String, + pub structure_nbt: Option, + pub response_type: StructureTemplateResponseType, +} + +// TODO: make sure this actually works \ No newline at end of file From 73c12974bfd99cbfd128cc173291c5c6ac2537b1 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:13:55 +1300 Subject: [PATCH 62/64] [packet] update_block_synced.rs --- .../v662/packets/update_block_synced.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/update_block_synced.rs diff --git a/crates/proto/src/version/v662/packets/update_block_synced.rs b/crates/proto/src/version/v662/packets/update_block_synced.rs new file mode 100644 index 00000000..45632e3f --- /dev/null +++ b/crates/proto/src/version/v662/packets/update_block_synced.rs @@ -0,0 +1,18 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::ActorBlockSyncMessage; +use crate::version::v662::types::NetworkBlockPosition; + +#[gamepacket(id = 110)] +#[derive(ProtoCodec)] +pub struct UpdateBlockSyncedPacket { + pub block_position: NetworkBlockPosition, + #[endianness(var)] + pub block_runtime_id: u32, + #[endianness(var)] + pub flags: u32, + #[endianness(var)] + pub later: u32, + #[endianness(var)] + pub unique_actor_id: i64, + pub actor_sync_message: ActorBlockSyncMessage::MessageId, +} \ No newline at end of file From be35f77955c5adabc65a91f1064d3d1907f200ac Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:14:00 +1300 Subject: [PATCH 63/64] [packet] update_soft_enum.rs --- .../src/version/v662/packets/update_soft_enum.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 crates/proto/src/version/v662/packets/update_soft_enum.rs diff --git a/crates/proto/src/version/v662/packets/update_soft_enum.rs b/crates/proto/src/version/v662/packets/update_soft_enum.rs new file mode 100644 index 00000000..62380721 --- /dev/null +++ b/crates/proto/src/version/v662/packets/update_soft_enum.rs @@ -0,0 +1,12 @@ +use bedrockrs_macros::{gamepacket, ProtoCodec}; +use crate::version::v662::enums::SoftEnumUpdateType; + +#[gamepacket(id = 114)] +#[derive(ProtoCodec)] +pub struct UpdateSoftEnumPacket { + pub enum_name: String, + #[vec_repr(u32)] + #[vec_endianness(var)] + pub values: Vec, + pub update_type: SoftEnumUpdateType, +} \ No newline at end of file From ee4aa401b173a268a211bb6e519c707bc5574a78 Mon Sep 17 00:00:00 2001 From: OmniacDEV Date: Thu, 5 Dec 2024 02:18:16 +1300 Subject: [PATCH 64/64] [enum] identity_definition.rs --- crates/proto/src/version/v662/enums/identity_definition.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/proto/src/version/v662/enums/identity_definition.rs b/crates/proto/src/version/v662/enums/identity_definition.rs index abcfaf81..ff17d09f 100644 --- a/crates/proto/src/version/v662/enums/identity_definition.rs +++ b/crates/proto/src/version/v662/enums/identity_definition.rs @@ -1,5 +1,6 @@ pub mod IdentityDefinition { - use bedrockrs_macros::ProtoCodec;use crate::version::v662::types::ActorUniqueID; + use bedrockrs_macros::ProtoCodec; + use crate::version::v662::types::ActorUniqueID; #[derive(ProtoCodec)] #[enum_repr(i8)]