From 56adb18cef0fb7e06c88bd9fcd465db09d6ffd47 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:35 +0200 Subject: [PATCH] fix(players): decode signed actor IDs in the player list PlayerListAddEntry uses compressed ActorUniqueID, a signed 64-bit value in the Bedrock 1.26.51 protocol-2193 schema. Decode its ZigZag representation consistently with StartGame instead of retaining the unsigned wire value. The private protocol-2193 skin relay exposed the mismatch: a spawned actor with ID 1 appeared in PlayerListStorage under ID 2. Live skin changes could not resolve the local UUID, and scoreboard associations could resolve another actor. Gophertunnel emits signed IDs as specified by the native schema. Evidence: https://github.com/Mojang/bedrock-protocol-docs/blob/v1.26.51/json/PlayerListAddEntry.json and https://github.com/Mojang/bedrock-protocol-docs/blob/v1.26.51/json/ActorUniqueID.json --- .../java/net/raphimc/viabedrock/protocol/packet/HudPackets.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java b/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java index 5271b9ab0..5c85eb1c1 100644 --- a/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java +++ b/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java @@ -76,7 +76,7 @@ public static void register(final BedrockProtocol protocol) { switch (action) { case Add -> { final UUID uuid = wrapper.read(BedrockTypes.UUID); // uuid - final long entityUniqueId = wrapper.read(BedrockTypes.UNSIGNED_VAR_LONG); // actorUniqueId + final long entityUniqueId = wrapper.read(BedrockTypes.VAR_LONG); // actorUniqueId final String name = wrapper.read(BedrockTypes.STRING); // name final String xuid = wrapper.read(BedrockTypes.STRING); // xuid final String platformOnlineId = wrapper.read(BedrockTypes.STRING); // platform online id