From 8af2526f86a7e1d2a346d98e6ac5b95bc632a654 Mon Sep 17 00:00:00 2001 From: kedor <99351777+aure31@users.noreply.github.com> Date: Sat, 27 Jun 2026 20:57:53 +0200 Subject: [PATCH 1/4] implementing enum packet to wit and generating new packet --- v0.1/bedrock-packets.wit | 13 +++++++++++++ v0.1/java-packets.wit | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/v0.1/bedrock-packets.wit b/v0.1/bedrock-packets.wit index 4ef7535..5d8e6ed 100644 --- a/v0.1/bedrock-packets.wit +++ b/v0.1/bedrock-packets.wit @@ -325,6 +325,18 @@ interface bedrock-packets { client-throttle-threshold: u8, client-throttle-scalar: f32, } + enum c-play-status { + login-success, + outdated-client, + outdated-server, + player-spawn, + invalid-tenant, + edition-mismatch-edu-to-vanilla, + edition-mismatch-vanilla-to-edu, + server-full-sub-client, + editor-mismatch-editor-to-vanilla, + editor-mismatch-vanilla-to-editor, + } record c-player-hotbar { selected-slot: s32, container-id: u8, @@ -546,6 +558,7 @@ interface bedrock-packets { c-move-player(c-move-player), c-network-chunk-publisher-update(c-network-chunk-publisher-update), c-network-settings(c-network-settings), + c-play-status(c-play-status), c-player-hotbar(c-player-hotbar), c-player-list(c-player-list), c-connected-pong(c-connected-pong), diff --git a/v0.1/java-packets.wit b/v0.1/java-packets.wit index fe1d18a..5cfd292 100644 --- a/v0.1/java-packets.wit +++ b/v0.1/java-packets.wit @@ -5,6 +5,10 @@ interface java-packets { record s-attack { entity-id: s32, } + record s-bundle-item-selected { + slot-id: s32, + selected-item-index: s32, + } record s-change-game-mode { game-mode: string, } @@ -166,6 +170,10 @@ interface java-packets { record s-rename-item { item-name: string, } + variant s-seen-advancement { + open-tab(string), + close-tab, + } record s-select-trade { selected-slot: s32, } @@ -196,9 +204,22 @@ interface java-packets { selection-priority: s32, placement-priority: s32, } + record s-set-test-block { + position: tuple, + mode: string, + message: string, + } record s-swing-arm { hand: s32, } + record s-teleport-to-entity { + target: uuid, + } + record s-test-instance-block-action { + pos: tuple, + action: string, + data: string, + } record s-update-sign { location: tuple, is-front-text: bool, @@ -513,6 +534,9 @@ interface java-packets { player-spawn-info: string, data-kept: u8, } + record c-select-advancements-tab { + tab-id: option, + } record c-play-server-links { links: list, } @@ -664,6 +688,13 @@ interface java-packets { z: s32, x: s32, } + record c-update-advancements { + reset: bool, + added: list, + removed: list, + progress: list, + show-advancements: bool, + } record c-update-attributes { entity-id: s32, properties: list, @@ -715,6 +746,7 @@ interface java-packets { } variant serverbound-packet { s-attack(s-attack), + s-bundle-item-selected(s-bundle-item-selected), s-change-game-mode(s-change-game-mode), s-chat-command(s-chat-command), s-chat-message(s-chat-message), @@ -752,13 +784,17 @@ interface java-packets { s-recipe-book-change-settings(s-recipe-book-change-settings), s-recipe-book-seen-recipe(s-recipe-book-seen-recipe), s-rename-item(s-rename-item), + s-seen-advancement(s-seen-advancement), s-select-trade(s-select-trade), s-set-beacon(s-set-beacon), s-set-command-block(s-set-command-block), s-set-creative-slot(s-set-creative-slot), s-set-held-item(s-set-held-item), s-set-jigsaw-block(s-set-jigsaw-block), + s-set-test-block(s-set-test-block), s-swing-arm(s-swing-arm), + s-teleport-to-entity(s-teleport-to-entity), + s-test-instance-block-action(s-test-instance-block-action), s-update-sign(s-update-sign), s-use-item(s-use-item), s-use-item-on(s-use-item-on), @@ -825,6 +861,7 @@ interface java-packets { c-remove-mob-effect(c-remove-mob-effect), c-reset-score(c-reset-score), c-respawn(c-respawn), + c-select-advancements-tab(c-select-advancements-tab), c-play-server-links(c-play-server-links), c-set-border-center(c-set-border-center), c-set-border-lerp-size(c-set-border-lerp-size), @@ -858,6 +895,7 @@ interface java-packets { c-ticking-step(c-ticking-step), c-transfer(c-transfer), c-unload-chunk(c-unload-chunk), + c-update-advancements(c-update-advancements), c-update-attributes(c-update-attributes), c-update-entity-pos(c-update-entity-pos), c-update-entity-pos-rot(c-update-entity-pos-rot), From c57aff84e704e08c9460e0b2229232be0cf4efdf Mon Sep 17 00:00:00 2001 From: kedor <99351777+aure31@users.noreply.github.com> Date: Sat, 27 Jun 2026 22:14:18 +0200 Subject: [PATCH 2/4] updating bedrock packet --- v0.1/bedrock-packets.wit | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/v0.1/bedrock-packets.wit b/v0.1/bedrock-packets.wit index 5d8e6ed..8f69711 100644 --- a/v0.1/bedrock-packets.wit +++ b/v0.1/bedrock-packets.wit @@ -157,6 +157,13 @@ interface bedrock-packets { record s-set-local-player-as-initialized { runtime-entity-id: string, } + record s-set-player-inventory-options { + left-inventory-tab: u8, + right-inventory-tab: u8, + filtering: bool, + inventory-layout: u8, + crafting-layout: u8, + } record s-text { needs-translation: bool, r-type: string, @@ -262,6 +269,13 @@ interface bedrock-packets { full-container-name: string, storage-item: string, } + record c-inventory-slot { + window-id: s32, + inventory-slot: s32, + container-name: option, + storage: option, + item: string, + } record c-item-registry { items: list, } @@ -531,6 +545,7 @@ interface bedrock-packets { s-request-network-settings(s-request-network-settings), s-resource-pack-response(s-resource-pack-response), s-set-local-player-as-initialized(s-set-local-player-as-initialized), + s-set-player-inventory-options(s-set-player-inventory-options), s-text(s-text), unknown, } @@ -548,6 +563,7 @@ interface bedrock-packets { c-gamerules-changed(c-gamerules-changed), c-handshake(c-handshake), c-inventory-content(c-inventory-content), + c-inventory-slot(c-inventory-slot), c-item-registry(c-item-registry), c-item-stack-response(c-item-stack-response), c-level-chunk(c-level-chunk), From 9712802f5430d476dce9be78ba95f6618f50dc69 Mon Sep 17 00:00:00 2001 From: kedor <99351777+aure31@users.noreply.github.com> Date: Sat, 4 Jul 2026 16:58:29 +0200 Subject: [PATCH 3/4] fix duplicate --- v0.1/bedrock-packets.wit | 7 ------- 1 file changed, 7 deletions(-) diff --git a/v0.1/bedrock-packets.wit b/v0.1/bedrock-packets.wit index 0174719..0ee2ee2 100644 --- a/v0.1/bedrock-packets.wit +++ b/v0.1/bedrock-packets.wit @@ -168,13 +168,6 @@ interface bedrock-packets { inventory-layout: u8, crafting-layout: u8, } - record s-set-player-inventory-options { - left-inventory-tab: u8, - right-inventory-tab: u8, - filtering: bool, - inventory-layout: u8, - crafting-layout: u8, - } record s-text { needs-translation: bool, r-type: string, From d064ee768e64edfffcff8d152cbf97d5c40c3da2 Mon Sep 17 00:00:00 2001 From: Ammar Date: Sat, 25 Jul 2026 01:00:42 +0500 Subject: [PATCH 4/4] fix(wit): replace position tuple with record, remove deprecated raw-text-component type - Change position from tuple to record with named x,y,z fields - Remove deprecated raw-text-component type alias - Breaking ABI change: plugins must recompile against new WIT definitions Refs: #449 --- v0.1/common.wit | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/v0.1/common.wit b/v0.1/common.wit index 282a219..da26a5a 100644 --- a/v0.1/common.wit +++ b/v0.1/common.wit @@ -1,9 +1,5 @@ /// Provides common types and utilities used across the entire plugin API. interface common { - /// Serialized text component as a postcard byte array. - /// @deprecated Use the text-component resource from the text interface instead. - type raw-text-component = list; - /// A position in the world grid (integers). record block-pos { x: s32, @@ -12,7 +8,11 @@ interface common { } /// A precise coordinate in the world (floats). - type position = tuple; + record position { + x: f64, + y: f64, + z: f64, + } /// Represents the hands of a player. enum hand {