From b0f53e470455647e40ded3e12ed32c38b06effa2 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Wed, 4 Nov 2026 00:32:59 +0100 Subject: [PATCH 1/4] docs(skins): link shared wardrobe validation --- docs/skin-flow.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/skin-flow.md b/docs/skin-flow.md index f67ce23c..cc48e8ab 100644 --- a/docs/skin-flow.md +++ b/docs/skin-flow.md @@ -49,6 +49,7 @@ The owning patch notes describe their specific validation and limits: - [Complete skin transport](../patches/viabedrock/upstreamable/0047-encode-current-bedrock-skin-packets.pr.md). - [Native player rendering](../patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.pr.md). +- [Shared animation and wardrobe masking](../patches/viafabricplus-bedrock/upstreamable/0008-share-native-actor-and-resource-runtime.pr.md). - [Account and wardrobe state](../patches/viafabricplus-bedrock/upstreamable/0009-manage-character-creator-accounts-and-wardrobes.pr.md). - [Server costumes](../patches/viafabricplus-bedrock/upstreamable/0016-render-server-player-costumes.pr.md). - [Equipped models](../patches/viafabricplus-bedrock/upstreamable/0017-render-equipped-native-pack-models.pr.md). From f7f285f17de614b6b4473eaacc71037f2e5ae605 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Wed, 4 Nov 2026 01:01:40 +0100 Subject: [PATCH 2/4] fix(players): refresh modes after profile replacement Keep local profile modes from the authoritative actor when PlayerList recreates a Java profile. Refresh Bedrock entities' cached PlayerInfo so their mode predicates agree with the movement controller after replacement. Fold both fixes into their owning patches and refresh dependent context. Validate with a failing-before packet regression, full builds, complete direct/proxy replays, and cold application of all four stacks. --- ...0007-forward-local-game-mode-updates.patch | 114 ++++++++++++++++-- ...0007-forward-local-game-mode-updates.pr.md | 16 +-- ...13-translate-remote-player-locations.patch | 4 +- ...6-remove-score-ids-across-objectives.patch | 12 +- ...-encode-current-bedrock-skin-packets.patch | 4 +- ...debar-title-images-and-styled-scores.patch | 6 +- ...n-completed-client-prediction-frames.patch | 18 +-- ...rate-authored-native-ui-presentation.patch | 6 +- ...w-confirmed-blacklisted-server-joins.patch | 4 +- .../0002-native-entities-and-skins.patch | 35 +++++- .../0002-native-entities-and-skins.pr.md | 4 + ...9-present-authored-native-containers.patch | 4 +- ...orted-native-world-actor-definitions.patch | 4 +- ...1-edit-native-command-block-settings.patch | 6 +- ...2-reconcile-native-block-break-audio.patch | 6 +- ...-animate-native-moving-piston-blocks.patch | 6 +- .../0035-forward-bedrock-fluid-pickup.patch | 4 +- ...0038-predict-held-trapdoor-placement.patch | 4 +- ...d-use-on-bedrock-peaceful-difficulty.patch | 4 +- ...ply-native-command-stacks-to-dry-air.patch | 4 +- ...ve-native-occlusion-with-moreculling.patch | 5 +- ...polate-native-remote-player-movement.patch | 6 +- 22 files changed, 193 insertions(+), 83 deletions(-) diff --git a/patches/viabedrock/upstreamable/0007-forward-local-game-mode-updates.patch b/patches/viabedrock/upstreamable/0007-forward-local-game-mode-updates.patch index 95281b47..93d2177b 100644 --- a/patches/viabedrock/upstreamable/0007-forward-local-game-mode-updates.patch +++ b/patches/viabedrock/upstreamable/0007-forward-local-game-mode-updates.patch @@ -1,4 +1,4 @@ -From 51de57250252105c4fee3c4d0fba6cdc2bcb4a2d Mon Sep 17 00:00:00 2001 +From 78b00adc6f26d347b38f9ba2a68eff8199e64604 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:33 +0200 Subject: [PATCH] fix(players): refresh local and inherited game modes @@ -15,14 +15,19 @@ refreshes and clearing removed or replaced actors. Send only changed remote modes. Keep the existing local profile/event updates and Java effective-mode fallback separate from native aim rules. + +Player-list refreshes use the local actor's authoritative mode rather than +the remote spawn cache. A protocol-2225 observer replay showed a Creative +local profile recreated as Survival before the first explicit mode event. +Keep the remote fallback and identity cache unchanged. --- - .../protocol/packet/ClientPlayerPackets.java | 38 ++- - .../protocol/packet/HudPackets.java | 3 +- + .../protocol/packet/ClientPlayerPackets.java | 38 +- + .../protocol/packet/HudPackets.java | 5 +- .../protocol/packet/OtherPlayerPackets.java | 2 + - .../protocol/storage/PlayerListStorage.java | 37 ++- - .../packet/PlayerGameTypePacketTest.java | 259 ++++++++++++++++++ - .../storage/PlayerListGameTypeTest.java | 75 +++++ - 6 files changed, 405 insertions(+), 9 deletions(-) + .../protocol/storage/PlayerListStorage.java | 37 +- + .../packet/PlayerGameTypePacketTest.java | 340 ++++++++++++++++++ + .../storage/PlayerListGameTypeTest.java | 75 ++++ + 6 files changed, 488 insertions(+), 9 deletions(-) create mode 100644 src/test/java/net/raphimc/viabedrock/protocol/packet/PlayerGameTypePacketTest.java create mode 100644 src/test/java/net/raphimc/viabedrock/protocol/storage/PlayerListGameTypeTest.java @@ -90,10 +95,10 @@ index 6197d5f0..65919a9d 100644 } }); 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 82795b85..46d77ccc 100644 +index 82795b85..eea1b264 100644 --- a/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java +++ b/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java -@@ -143,12 +143,13 @@ public final class HudPackets { +@@ -143,12 +143,15 @@ public final class HudPackets { if (!profiles.isEmpty()) { final PacketWrapper infoAddPacket = PacketWrapper.create(ClientboundPackets26_3.PLAYER_INFO_UPDATE, wrapper.user()); @@ -104,7 +109,9 @@ index 82795b85..46d77ccc 100644 infoAddPacket.write(Types.UUID, profile.id()); // uuid infoAddPacket.write(Types.STRING, StringUtil.encodeUuid(profile.id())); // username infoAddPacket.write(Types.PROFILE_PROPERTY_ARRAY, profile.properties()); // properties -+ infoAddPacket.write(Types.VAR_INT, playerListStorage.getJavaGameMode(profile.id(), wrapper.user().get(GameSessionStorage.class).getLevelGameType()).ordinal()); // game mode ++ final var clientPlayer = wrapper.user().get(EntityTracker.class).getClientPlayer(); ++ infoAddPacket.write(Types.VAR_INT, (profile.id().equals(clientPlayer.javaUuid()) ? clientPlayer.javaGameMode() ++ : playerListStorage.getJavaGameMode(profile.id(), wrapper.user().get(GameSessionStorage.class).getLevelGameType())).ordinal()); // game mode infoAddPacket.write(Types.BOOLEAN, true); // listed infoAddPacket.write(Types.OPTIONAL_TAG, TextUtil.stringToNbt(profile.name())); // display name } @@ -197,10 +204,10 @@ index 7faac327..e0da8572 100644 } diff --git a/src/test/java/net/raphimc/viabedrock/protocol/packet/PlayerGameTypePacketTest.java b/src/test/java/net/raphimc/viabedrock/protocol/packet/PlayerGameTypePacketTest.java new file mode 100644 -index 00000000..6f5dcd99 +index 00000000..677f2aa5 --- /dev/null +++ b/src/test/java/net/raphimc/viabedrock/protocol/packet/PlayerGameTypePacketTest.java -@@ -0,0 +1,259 @@ +@@ -0,0 +1,340 @@ +/* + * This file is part of ViaBedrock - https://github.com/RaphiMC/ViaBedrock + * Copyright (C) 2026 RK_01/RaphiMC and contributors @@ -227,6 +234,10 @@ index 00000000..6f5dcd99 +import io.netty.buffer.UnpooledByteBufAllocator; +import io.netty.channel.Channel; +import net.raphimc.viabedrock.api.model.entity.ClientPlayerEntity; ++import com.viaversion.viaversion.api.platform.providers.ViaProviders; ++import net.raphimc.viabedrock.protocol.model.SkinData; ++import net.raphimc.viabedrock.protocol.provider.SkinProvider; ++import net.raphimc.viabedrock.protocol.storage.ScoreboardTracker; +import net.raphimc.viabedrock.protocol.BedrockProtocol; +import net.raphimc.viabedrock.protocol.ClientboundBedrockPackets; +import net.raphimc.viabedrock.protocol.data.enums.bedrock.generated.GameType; @@ -316,15 +327,36 @@ index 00000000..6f5dcd99 + assertEquals(List.of(Map.of(fixture.local.javaUuid(), GameMode.SPECTATOR)), fixture.profileUpdates()); + } + ++ @Test ++ void playerListRefreshKeepsTheLocalAuthoritativeModeWithoutRemoteCacheEntries() throws Exception { ++ final var fixture = new Fixture(); ++ final UUID remote = UUID.randomUUID(); ++ fixture.players.setGameType(remote, 20, GameType.Adventure); ++ for (final var mode : new GameType[]{GameType.Creative, GameType.Spectator, GameType.Survival}) { ++ fixture.local.setGameType(mode); ++ fixture.sent.clear(); ++ fixture.refreshProfiles(remote); ++ assertEquals(Map.of(fixture.local.javaUuid(), fixture.local.javaGameMode(), remote, GameMode.ADVENTURE), ++ fixture.addedProfileModes()); ++ } ++ } ++ + private static final class Fixture { + private final Map, Object> storage = new HashMap<>(); + private final List sent = new ArrayList<>(); + private final PlayerListStorage players = new PlayerListStorage(); ++ private final ViaProviders providers = new ViaProviders(); + private final TestProtocol protocol = new TestProtocol(); + private final UserConnection user; + private final ClientPlayerEntity local; + + private Fixture() throws Exception { ++ this.providers.register(SkinProvider.class, new SkinProvider() { ++ @Override ++ public void setSkin(final UserConnection user, final UUID uuid, final SkinData skin) { ++ } ++ }); ++ this.storage.put(ScoreboardTracker.class, new ScoreboardTracker()); + final ProtocolPipeline pipeline = (ProtocolPipeline) Proxy.newProxyInstance(ProtocolPipeline.class.getClassLoader(), + new Class[]{ProtocolPipeline.class}, (proxy, method, args) -> List.of()); + final ProtocolInfo info = (ProtocolInfo) Proxy.newProxyInstance(ProtocolInfo.class.getClassLoader(), @@ -402,7 +434,10 @@ index 00000000..6f5dcd99 + new Class[]{ProtocolManager.class}, (proxy, method, args) -> + new PacketWrapperImpl((PacketType) args[0], (ByteBuf) args[1], (UserConnection) args[2])); + final ViaManager manager = (ViaManager) Proxy.newProxyInstance(ViaManager.class.getClassLoader(), -+ new Class[]{ViaManager.class}, (proxy, method, args) -> protocolManager); ++ new Class[]{ViaManager.class}, (proxy, method, args) -> switch (method.getName()) { ++ case "getProviders" -> this.providers; ++ default -> protocolManager; ++ }); + final var managerField = Via.class.getDeclaredField("manager"); + managerField.setAccessible(true); + final Object previousManager = managerField.get(null); @@ -416,6 +451,58 @@ index 00000000..6f5dcd99 + return packet; + } + ++ private void refreshProfiles(final UUID remote) throws Exception { ++ final var input = Unpooled.buffer(); ++ try { ++ BedrockTypes.UNSIGNED_VAR_INT.write(input, 2); ++ for (final UUID uuid : new UUID[]{this.local.javaUuid(), remote}) { ++ BedrockTypes.UNSIGNED_VAR_INT.write(input, 1); // Add variant ++ input.writeByte(0); // ordinal ++ BedrockTypes.UUID.write(input, uuid); ++ BedrockTypes.VAR_LONG.write(input, uuid.equals(remote) ? 20L : 10L); ++ BedrockTypes.STRING.write(input, uuid.toString()); ++ for (int i = 0; i < 3; i++) { ++ BedrockTypes.STRING.write(input, ""); ++ } ++ input.writeIntLE(0); ++ BedrockTypes.SKIN.write(input, new SkinData("", "", null, List.of(), null, "", "", "", ++ false, false, false, false, "", "", "wide", "#FF000000", List.of(), List.of(), false, "", "")); ++ input.writeBoolean(false).writeBoolean(false).writeBoolean(false).writeIntLE(0); ++ } ++ assertTrue(this.translate(ClientboundBedrockPackets.PLAYER_LIST, input).isCancelled()); ++ } finally { ++ input.release(); ++ } ++ } ++ ++ private Map addedProfileModes() throws Exception { ++ final Map result = new HashMap<>(); ++ for (final byte[] bytes : this.sent) { ++ final var input = Unpooled.wrappedBuffer(bytes); ++ try { ++ if (Types.VAR_INT.read(input) != ClientboundPackets26_3.PLAYER_INFO_UPDATE.getId()) { ++ continue; ++ } ++ final var actions = Types.PROFILE_ACTIONS_ENUM1_21_4.read(input); ++ assertTrue(actions.get(0)); ++ assertTrue(actions.get(2)); ++ final int size = Types.VAR_INT.read(input); ++ for (int i = 0; i < size; i++) { ++ final UUID uuid = Types.UUID.read(input); ++ Types.STRING.read(input); ++ Types.PROFILE_PROPERTY_ARRAY.read(input); ++ result.put(uuid, GameMode.values()[Types.VAR_INT.read(input)]); ++ Types.BOOLEAN.read(input); ++ Types.OPTIONAL_TAG.read(input); ++ } ++ assertFalse(input.isReadable()); ++ } finally { ++ input.release(); ++ } ++ } ++ return result; ++ } ++ + private List> profileUpdates() { + final var profiles = new ArrayList>(); + int events = 0; @@ -452,6 +539,7 @@ index 00000000..6f5dcd99 + private static final class TestProtocol extends BedrockProtocol { + private TestProtocol() { + ClientPlayerPackets.register(this); ++ HudPackets.register(this); + } + + private PacketMapping clientbound(final PacketWrapper packet) { diff --git a/patches/viabedrock/upstreamable/0007-forward-local-game-mode-updates.pr.md b/patches/viabedrock/upstreamable/0007-forward-local-game-mode-updates.pr.md index 28308b86..9db3f087 100644 --- a/patches/viabedrock/upstreamable/0007-forward-local-game-mode-updates.pr.md +++ b/patches/viabedrock/upstreamable/0007-forward-local-game-mode-updates.pr.md @@ -12,25 +12,19 @@ Removal clears state even when the list entry is absent. The existing local unique-ID lookup still accepts updates before a player-list entry exists. Local profile updates and game-mode events keep their separate path. +List refreshes take the local profile mode from the authoritative local actor, including before an explicit mode event. The remote cache fallback applies only to remote profiles. Java's existing `Undefined` fallback stays unchanged. This fallback does not establish the native spectator predicate used by aim assistance. ## Evidence and tests -The target is Bedrock 1.26.51.1, protocol 2193. +Current tests target Bedrock 1.26.60, protocol 2225. [Mojang's packet description](https://mojang.github.io/bedrock-protocol-docs/1.26.51/packets/update-player-game-type-packet/) identifies the update as a cache refresh for all clients. The [default-mode packet](https://mojang.github.io/bedrock-protocol-docs/1.26.51/packets/set-default-game-type-packet/) changes the shared default. These references support packet purpose, without supplying new enum values. -Six focused tests cover translated player updates, default transitions, Java packet fields, local events, and cache identity changes. -The previous packet handlers fail both remote-update regressions. -The corrected handlers pass all six tests after replay of the full 104-patch core stack. +Packet tests cover remote updates, inherited defaults, local events, cache identity changes, and repeated local profile refreshes in Creative, Spectator, and Survival. The refresh regression fails with the previous handler because it writes Survival for the local Creative profile. Remote Adventure state remains unchanged. -The four-project build reports 2,941 passed tests, 312 optional skips, and no failures or errors. -Both core Checkstyle tasks pass. -All six new mode tests pass without skips. -The packaged client classes, core and converter dependencies, and four source snapshots match the tested outputs. -Optional native-reference and GPU controls from earlier rendering milestones are outside this build run. +A controlled protocol-2225 replay preserves captured official Bedrock 1.26.60.5 skin and profile payloads, then adds declared mode transitions and a repeated captured list packet. Read-only installed-client observations compare the player entity, current profile, and movement controller. The add-on's [player profile refresh](../../viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.pr.md) handles Java's separate stale-profile cache. -These controls verify Java translation and cache behavior. -They do not establish native aim inputs, graphical equality, or complete remote skin parity. +The complete core build and both Checkstyle tasks pass. Direct and proxy replays check the selected mode/profile transitions and complete transport. These controls do not establish complete movement, aim, graphics, or remote skin parity. diff --git a/patches/viabedrock/upstreamable/0013-translate-remote-player-locations.patch b/patches/viabedrock/upstreamable/0013-translate-remote-player-locations.patch index 959e00e5..a03e740c 100644 --- a/patches/viabedrock/upstreamable/0013-translate-remote-player-locations.patch +++ b/patches/viabedrock/upstreamable/0013-translate-remote-player-locations.patch @@ -1,4 +1,4 @@ -From 4f721d506c4ee25af2ad58a0d2851f471a007b5c Mon Sep 17 00:00:00 2001 +From a282442dec513ccd726c3fa76d86e0f24165877e Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:34 +0200 Subject: [PATCH] feat(hud): preserve native Bedrock locator updates @@ -341,7 +341,7 @@ index 00000000..52b621c8 + +} 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 46d77ccc..7be21380 100644 +index eea1b264..80c97cff 100644 --- a/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java +++ b/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java @@ -129,6 +129,7 @@ public final class HudPackets { diff --git a/patches/viabedrock/upstreamable/0026-remove-score-ids-across-objectives.patch b/patches/viabedrock/upstreamable/0026-remove-score-ids-across-objectives.patch index d17b16f9..ceab3b4b 100644 --- a/patches/viabedrock/upstreamable/0026-remove-score-ids-across-objectives.patch +++ b/patches/viabedrock/upstreamable/0026-remove-score-ids-across-objectives.patch @@ -1,4 +1,4 @@ -From 37d56a085ba6c9eaae59d90c9952a87ad13bf455 Mon Sep 17 00:00:00 2001 +From 4af13c3a2eb0aaec43caba8a36a6aec611b7a647 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:34 +0200 Subject: [PATCH] fix(scoreboard): remove score IDs across objectives @@ -11,7 +11,7 @@ Bedrock can remove a score ID without naming an objective. Clear every tracked o create mode 100644 src/test/java/net/raphimc/viabedrock/protocol/packet/HudPacketsTest.java 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 7be21380..bac34b8f 100644 +index 80c97cff..48cadcff 100644 --- a/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java +++ b/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java @@ -18,6 +18,7 @@ @@ -22,7 +22,7 @@ index 7be21380..bac34b8f 100644 import com.viaversion.viaversion.api.minecraft.GameProfile; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; -@@ -272,7 +273,6 @@ public final class HudPackets { +@@ -274,7 +275,6 @@ public final class HudPackets { final String objectiveName; final ScoreboardEntry entry; @@ -30,7 +30,7 @@ index 7be21380..bac34b8f 100644 switch (action) { case Remove -> { -@@ -280,7 +280,6 @@ public final class HudPackets { +@@ -282,7 +282,6 @@ public final class HudPackets { objectiveName = wrapper.read(BedrockTypes.STRING); } else { objectiveName = null; @@ -38,7 +38,7 @@ index 7be21380..bac34b8f 100644 } entry = null; } -@@ -300,9 +299,9 @@ public final class HudPackets { +@@ -302,9 +301,9 @@ public final class HudPackets { default -> throw new IllegalStateException("Unhandled ScorePacketEntryAction: " + action); } @@ -51,7 +51,7 @@ index 7be21380..bac34b8f 100644 } final ScoreboardObjective objective = scoreboardTracker.getObjective(objectiveName); -@@ -455,6 +454,21 @@ public final class HudPackets { +@@ -457,6 +456,21 @@ public final class HudPackets { }); } diff --git a/patches/viabedrock/upstreamable/0047-encode-current-bedrock-skin-packets.patch b/patches/viabedrock/upstreamable/0047-encode-current-bedrock-skin-packets.patch index 0b33a01f..d3262878 100644 --- a/patches/viabedrock/upstreamable/0047-encode-current-bedrock-skin-packets.patch +++ b/patches/viabedrock/upstreamable/0047-encode-current-bedrock-skin-packets.patch @@ -1,4 +1,4 @@ -From 4ac81bfa002a49109c14ffa9aa4cc2c1bfd8fac9 Mon Sep 17 00:00:00 2001 +From e9f96316ec11d0441539d0c5e4f2eedb96c4e37b 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(skins): encode current Bedrock skin packets @@ -445,7 +445,7 @@ index 070d83f4..3a5f8a94 100644 public record AnimationData(BufferedImage image, int type, float frames, int expression) { } 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 bac34b8f..a69ed176 100644 +index 48cadcff..c717576d 100644 --- a/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java +++ b/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java @@ -99,9 +99,8 @@ public final class HudPackets { diff --git a/patches/viabedrock/upstreamable/0072-convert-native-sidebar-title-images-and-styled-scores.patch b/patches/viabedrock/upstreamable/0072-convert-native-sidebar-title-images-and-styled-scores.patch index a91e32d7..68631c1a 100644 --- a/patches/viabedrock/upstreamable/0072-convert-native-sidebar-title-images-and-styled-scores.patch +++ b/patches/viabedrock/upstreamable/0072-convert-native-sidebar-title-images-and-styled-scores.patch @@ -1,4 +1,4 @@ -From 543cf8710d7fb0aafe19811905bda64475d8f51a Mon Sep 17 00:00:00 2001 +From a177eea5706536c4bc0360875a52accbce7fe663 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(scoreboard): convert native sidebar title images and @@ -862,7 +862,7 @@ index 129790fd..8f4de419 100644 out.append(style.asString()); } 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 a69ed176..9b3d2af5 100644 +index c717576d..910f6420 100644 --- a/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java +++ b/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java @@ -17,6 +17,7 @@ @@ -899,7 +899,7 @@ index a69ed176..9b3d2af5 100644 public static void register(final BedrockProtocol protocol) { protocol.registerClientbound(ClientboundBedrockPackets.PLAYER_LIST, null, wrapper -> { final PlayerListStorage playerListStorage = wrapper.user().get(PlayerListStorage.class); -@@ -248,17 +262,23 @@ public final class HudPackets { +@@ -250,17 +264,23 @@ public final class HudPackets { return; } diff --git a/patches/viabedrock/upstreamable/0092-retain-completed-client-prediction-frames.patch b/patches/viabedrock/upstreamable/0092-retain-completed-client-prediction-frames.patch index c444e27e..d99c5d66 100644 --- a/patches/viabedrock/upstreamable/0092-retain-completed-client-prediction-frames.patch +++ b/patches/viabedrock/upstreamable/0092-retain-completed-client-prediction-frames.patch @@ -1,4 +1,4 @@ -From dc82fa3bb6039581f82c418785cae45d92bdd058 Mon Sep 17 00:00:00 2001 +From e878d9968d04d39e09d6c3d2609280ca95c861ca Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(movement): retain completed client prediction frames @@ -11063,13 +11063,13 @@ index 00000000..7aea0fed + +} diff --git a/src/test/java/net/raphimc/viabedrock/protocol/packet/PlayerGameTypePacketTest.java b/src/test/java/net/raphimc/viabedrock/protocol/packet/PlayerGameTypePacketTest.java -index 6f5dcd99..867e595a 100644 +index 677f2aa5..b92e2021 100644 --- a/src/test/java/net/raphimc/viabedrock/protocol/packet/PlayerGameTypePacketTest.java +++ b/src/test/java/net/raphimc/viabedrock/protocol/packet/PlayerGameTypePacketTest.java -@@ -24,6 +24,13 @@ import io.netty.buffer.ByteBuf; - import io.netty.buffer.UnpooledByteBufAllocator; - import io.netty.channel.Channel; - import net.raphimc.viabedrock.api.model.entity.ClientPlayerEntity; +@@ -28,6 +28,13 @@ import com.viaversion.viaversion.api.platform.providers.ViaProviders; + import net.raphimc.viabedrock.protocol.model.SkinData; + import net.raphimc.viabedrock.protocol.provider.SkinProvider; + import net.raphimc.viabedrock.protocol.storage.ScoreboardTracker; +import net.raphimc.viabedrock.api.model.PlayerModeMessage; +import net.raphimc.viabedrock.protocol.storage.PlayerModeStorage; +import net.raphimc.viabedrock.protocol.storage.PlayerPredictionStorage; @@ -11080,8 +11080,8 @@ index 6f5dcd99..867e595a 100644 import net.raphimc.viabedrock.protocol.BedrockProtocol; import net.raphimc.viabedrock.protocol.ClientboundBedrockPackets; import net.raphimc.viabedrock.protocol.data.enums.bedrock.generated.GameType; -@@ -113,6 +120,51 @@ final class PlayerGameTypePacketTest { - assertEquals(List.of(Map.of(fixture.local.javaUuid(), GameMode.SPECTATOR)), fixture.profileUpdates()); +@@ -131,6 +138,51 @@ final class PlayerGameTypePacketTest { + } } + @Test @@ -11132,7 +11132,7 @@ index 6f5dcd99..867e595a 100644 private static final class Fixture { private final Map, Object> storage = new HashMap<>(); private final List sent = new ArrayList<>(); -@@ -170,11 +222,15 @@ final class PlayerGameTypePacketTest { +@@ -195,11 +247,15 @@ final class PlayerGameTypePacketTest { } private PacketWrapper updatePlayer(final long uniqueId, final GameType gameType) throws Exception { diff --git a/patches/viabedrock/upstreamable/0095-integrate-authored-native-ui-presentation.patch b/patches/viabedrock/upstreamable/0095-integrate-authored-native-ui-presentation.patch index 3236a783..d697e291 100644 --- a/patches/viabedrock/upstreamable/0095-integrate-authored-native-ui-presentation.patch +++ b/patches/viabedrock/upstreamable/0095-integrate-authored-native-ui-presentation.patch @@ -1,4 +1,4 @@ -From d4c9c95d838679a0b24abfc2bed187bd3f97b126 Mon Sep 17 00:00:00 2001 +From 027e14bd59d7e3160d3a99895cda1ba05b5bc4fc Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:37 +0200 Subject: [PATCH] feat(ui): resolve authored Bedrock server UI scenes @@ -3983,7 +3983,7 @@ index 00000000..5ceed231 + +} 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 9b3d2af5..1f21b9a4 100644 +index 910f6420..ea1d8d7e 100644 --- a/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java +++ b/src/main/java/net/raphimc/viabedrock/protocol/packet/HudPackets.java @@ -26,14 +26,22 @@ import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; @@ -4044,7 +4044,7 @@ index 9b3d2af5..1f21b9a4 100644 public static void register(final BedrockProtocol protocol) { protocol.registerClientbound(ClientboundBedrockPackets.PLAYER_LIST, null, wrapper -> { final PlayerListStorage playerListStorage = wrapper.user().get(PlayerListStorage.class); -@@ -207,6 +222,28 @@ public final class HudPackets { +@@ -209,6 +224,28 @@ public final class HudPackets { text = rootComponent.asString(); } diff --git a/patches/viafabricplus-bedrock/deferred/0001-allow-confirmed-blacklisted-server-joins.patch b/patches/viafabricplus-bedrock/deferred/0001-allow-confirmed-blacklisted-server-joins.patch index e30640a6..ea137d60 100644 --- a/patches/viafabricplus-bedrock/deferred/0001-allow-confirmed-blacklisted-server-joins.patch +++ b/patches/viafabricplus-bedrock/deferred/0001-allow-confirmed-blacklisted-server-joins.patch @@ -1,4 +1,4 @@ -From 671d083f0b1f9fbe359a81b06cc5ff13475cb665 Mon Sep 17 00:00:00 2001 +From db1e72ca9a64e12e3b04cf3f9caddf0d6619094e Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 1 Nov 2026 14:06:07 +0100 Subject: [PATCH] feat(connection): allow confirmed blacklisted server joins @@ -247,7 +247,7 @@ index f345d7c..40e7ae9 100644 "command_block.viafabricplus.first_tick": "Execute on first tick", "base.viafabricplus.accept": "Accept", diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 65afd38..c073c0e 100644 +index 5376006..aae2a90 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -49,6 +49,8 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.patch b/patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.patch index 687b5ead..6f0c9a52 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.patch @@ -1,4 +1,4 @@ -From bf59659f819670153883df9b55c52b3e0f8434f0 Mon Sep 17 00:00:00 2001 +From 143796b877eeaf9ee0b15f4cc7aec8503afe3cae Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:34 +0200 Subject: [PATCH] feat(bedrock): render custom entities and player skins @@ -785,6 +785,14 @@ three-quarter, and full depth. They also check negative depth, transparent texels, untouched discarded depth, and ordinary draws. Transformed Iris and fallback programs retain the same coverage and restore full coverage when the shared program draws another material. + +Resolve player profiles from the current connection after native list +refreshes. Java 26.3 caches PlayerInfo in the live player entity even when +a remove/add replaces the map entry. In a protocol-2225 observer replay, +the movement controller and current profile entered Spectator while the +entity stayed Creative. Refresh the cached owner only on a direct Bedrock +connection or after accepted native rendering metadata on a proxy route. +Ordinary Java connections keep their existing cache behavior. --- build.gradle.kts | 6 + settings.gradle.kts | 3 + @@ -814,7 +822,7 @@ restore full coverage when the shared program draws another material. .../mixin/compat/iris/MixinIrisPipelines.java | 23 ++ .../compat/iris/MixinNativeShaderBinding.java | 38 ++ .../iris/MixinNativeShaderCompilation.java | 30 ++ - .../render/MixinAbstractClientPlayer.java | 38 ++ + .../render/MixinAbstractClientPlayer.java | 55 +++ .../render/MixinBedrockActorDynamicData.java | 64 +++ .../render/MixinBedrockActorGlintFrame.java | 33 ++ .../render/MixinBedrockActorPipelines.java | 27 ++ @@ -906,7 +914,7 @@ restore full coverage when the shared program draws another material. .../bedrock/render/EglTestContext.java | 52 +++ .../compat/iris/BedrockIrisAlphaGpuTest.java | 391 ++++++++++++++++++ .../compat/iris/BedrockIrisGlintGpuTest.java | 253 ++++++++++++ - 120 files changed, 8624 insertions(+) + 120 files changed, 8641 insertions(+) create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/BedrockMixinPlugin.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/access/IBedrockActorDynamicData.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/access/IBedrockActorPreparedRenderType.java @@ -2066,10 +2074,10 @@ index 0000000..f2534d4 +} diff --git a/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/render/MixinAbstractClientPlayer.java b/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/render/MixinAbstractClientPlayer.java new file mode 100644 -index 0000000..13cd684 +index 0000000..eab8d23 --- /dev/null +++ b/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/render/MixinAbstractClientPlayer.java -@@ -0,0 +1,38 @@ +@@ -0,0 +1,55 @@ +/* + * This file is part of ViaFabricPlus Bedrock - https://github.com/ViaVersionAddons/viafabricplus-bedrock + * Copyright (C) 2026 ViaVersion and contributors @@ -2090,10 +2098,16 @@ index 0000000..13cd684 + +package com.viaversion.viafabricplus.bedrock.injection.mixin.features.render; + ++import com.viaversion.viafabricplus.ViaFabricPlus; ++import com.viaversion.viafabricplus.bedrock.render.light.BedrockRenderingMetadata; +import com.viaversion.viafabricplus.bedrock.render.BedrockPlayerSkins; ++import net.minecraft.client.Minecraft; ++import net.minecraft.client.multiplayer.PlayerInfo; ++import net.raphimc.viabedrock.api.BedrockProtocolVersion; +import net.minecraft.client.player.AbstractClientPlayer; +import net.minecraft.world.entity.player.PlayerSkin; +import org.spongepowered.asm.mixin.Mixin; ++import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @@ -2101,6 +2115,17 @@ index 0000000..13cd684 +@Mixin(AbstractClientPlayer.class) +public abstract class MixinAbstractClientPlayer { + ++ @Shadow private PlayerInfo playerInfo; ++ ++ @Inject(method = "getPlayerInfo", at = @At("HEAD")) ++ private void refreshBedrockProfile(final CallbackInfoReturnable cir) { ++ if (!BedrockRenderingMetadata.active() ++ && !ViaFabricPlus.api().targetVersion().equals(BedrockProtocolVersion.BEDROCK_LATEST)) return; ++ // Bedrock can replace a profile without replacing its live player entity. ++ final var connection = Minecraft.getInstance().getConnection(); ++ this.playerInfo = connection == null ? null : connection.getPlayerInfo(((AbstractClientPlayer) (Object) this).getUUID()); ++ } ++ + @Inject(method = "getSkin", at = @At("RETURN"), cancellable = true) + private void bedrockSkin(final CallbackInfoReturnable cir) { + final AbstractClientPlayer player = (AbstractClientPlayer) (Object) this; diff --git a/patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.pr.md b/patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.pr.md index e2c6803a..1f4cd2d9 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.pr.md +++ b/patches/viafabricplus-bedrock/upstreamable/0002-native-entities-and-skins.pr.md @@ -8,6 +8,8 @@ Import native Bedrock entity and skin rendering from viafabricplus-bedrock PR #9 Keep per-player appearance and animation state separate from server costumes and equipment. Preserve native geometry, UVs, materials, animated surfaces, and connection-owned resources. +Native player entities resolve the current connection's profile after list replacements. Java 26.3 otherwise retains the old `PlayerInfo` object, leaving entity predicates in an earlier mode while the movement controller has changed. Ordinary Java connections retain their existing profile cache. + World player surfaces use separate cached materials for native near-camera fading. Shared hands, unrelated actors, and GUI portraits retain their own materials. The native and Iris programs use the same ordered coverage function. Surviving pixels retain the material depth policy. @@ -20,6 +22,8 @@ Prerequisites: Regression coverage includes `BedrockAcceptedResourcesTest`, `BedrockActorDepthGpuTest`, `BedrockActorGlintFramesTest`, `BedrockShaderAlphaTest`, and `BedrockPlayerFadeGpuTest`. +A controlled protocol-2225 replay uses captured official 1.26.60.5 skin/profile bytes with declared Creative, Spectator, Survival, and return transitions plus a repeated profile list. The previous client keeps an old Creative profile after the current profile and controller enter Spectator. Read-only installed-client observations verify agreement after the fix on direct and proxy routes. The [core mode patch](../../viabedrock/upstreamable/0007-forward-local-game-mode-updates.pr.md) separately preserves the local mode when recreating the profile. These controls verify state ownership, without establishing complete native trajectories or visual parity. + Official Bedrock 1.26.60.5 (protocol 2225) GPU draws establish the player fade across zero to one block of signed view depth. The native near-player draws remain two-sided. A matching Java replay initially obscures the lobby with an opaque player head. `BedrockPlayerFadeGpuTest` checks fixed 8×8 coverage patterns and color/depth preservation through actor, Iris, and fallback shaders. diff --git a/patches/viafabricplus-bedrock/upstreamable/0029-present-authored-native-containers.patch b/patches/viafabricplus-bedrock/upstreamable/0029-present-authored-native-containers.patch index 870543ce..cf4908d4 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0029-present-authored-native-containers.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0029-present-authored-native-containers.patch @@ -1,4 +1,4 @@ -From b29d270a60bb1422195d36d5fdcec2908ae11317 Mon Sep 17 00:00:00 2001 +From 3edb4c933e6fefa2c5c44a219bb6892302e90bb7 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(inventory): present authored native containers @@ -6735,7 +6735,7 @@ index d0fac3c..da0aa13 100644 "bedrock_settings.viafabricplus.allow_camera_shake": "Allow camera shake", "bedrock_settings.viafabricplus.particle_view_distance": "Particle render distance", diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index b4c2ad2..b436365 100644 +index 0936821..b37bed9 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -14,6 +14,12 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0030-use-supported-native-world-actor-definitions.patch b/patches/viafabricplus-bedrock/upstreamable/0030-use-supported-native-world-actor-definitions.patch index 49179262..506574f0 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0030-use-supported-native-world-actor-definitions.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0030-use-supported-native-world-actor-definitions.patch @@ -1,4 +1,4 @@ -From f57560f5c106eee11fa3c33938f51c725330903c Mon Sep 17 00:00:00 2001 +From aa187266e3cf904880e638d4a6b1731b460483e3 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(render): use supported native world actor definitions @@ -1031,7 +1031,7 @@ index 0000000..a7d9469 + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 241b180..5be1c7d 100644 +index b37bed9..4497d10 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -117,6 +117,7 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0031-edit-native-command-block-settings.patch b/patches/viafabricplus-bedrock/upstreamable/0031-edit-native-command-block-settings.patch index 668881f8..0a2f0a84 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0031-edit-native-command-block-settings.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0031-edit-native-command-block-settings.patch @@ -1,4 +1,4 @@ -From b6821c9d03c321f5ab9b3039ef967d9fd474bc98 Mon Sep 17 00:00:00 2001 +From 4221143c0f42303e431cd6d3bb03d9d6713774e8 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(command): edit native command block settings @@ -341,10 +341,10 @@ index da0aa13..f345d7c 100644 "base.viafabricplus.code": "Code", "base.viafabricplus.copy_link": "Copy link", diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 5be1c7d..8dbe1c4 100644 +index 4497d10..8dd9568 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -201,6 +201,8 @@ +@@ -203,6 +203,8 @@ "features.movement.MixinLocalPlayer", "features.movement.MixinPlayerCorrectionPacketListener", "features.movement.MixinPlayer", diff --git a/patches/viafabricplus-bedrock/upstreamable/0032-reconcile-native-block-break-audio.patch b/patches/viafabricplus-bedrock/upstreamable/0032-reconcile-native-block-break-audio.patch index cf5b62ff..6a9237ea 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0032-reconcile-native-block-break-audio.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0032-reconcile-native-block-break-audio.patch @@ -1,4 +1,4 @@ -From ff3d849ff0fdf7ab73c04b3a31d08fbec3d47412 Mon Sep 17 00:00:00 2001 +From 80fe135988f978b0022ffa21d007de25a8721ed5 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] fix(sound): reconcile native block break audio @@ -71,10 +71,10 @@ index 0000000..9f24afb + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 8dbe1c4..cc85e7a 100644 +index 8dd9568..49d5336 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -201,6 +201,7 @@ +@@ -203,6 +203,7 @@ "features.movement.MixinLocalPlayer", "features.movement.MixinPlayerCorrectionPacketListener", "features.movement.MixinPlayer", diff --git a/patches/viafabricplus-bedrock/upstreamable/0034-animate-native-moving-piston-blocks.patch b/patches/viafabricplus-bedrock/upstreamable/0034-animate-native-moving-piston-blocks.patch index 9d0b8b8b..42076690 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0034-animate-native-moving-piston-blocks.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0034-animate-native-moving-piston-blocks.patch @@ -1,4 +1,4 @@ -From 028bdf035da9f5e6732e0233910acc2ee241bc5e Mon Sep 17 00:00:00 2001 +From 40477b229ced229fd0e810abd06bc2a5b713c9ea Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] fix(render): animate native moving piston blocks @@ -155,10 +155,10 @@ index 0000000..f23da98 + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index cc85e7a..b91bdb8 100644 +index 49d5336..d51bd43 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -204,6 +204,8 @@ +@@ -206,6 +206,8 @@ "features.sound.MixinBedrockMiningAudio", "features.block.MixinBedrockCommandBlockSettings", "features.inventory.MixinBedrockCommandBlockScreen", diff --git a/patches/viafabricplus-bedrock/upstreamable/0035-forward-bedrock-fluid-pickup.patch b/patches/viafabricplus-bedrock/upstreamable/0035-forward-bedrock-fluid-pickup.patch index 3bfe88ec..0c8c3e93 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0035-forward-bedrock-fluid-pickup.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0035-forward-bedrock-fluid-pickup.patch @@ -1,4 +1,4 @@ -From fd9df6e89342b2402c470e25145ad459be952555 Mon Sep 17 00:00:00 2001 +From f210ddaeaf7bb724c603874c213d8dbff292daac Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] fix(interaction): forward Bedrock fluid pickup @@ -113,7 +113,7 @@ index 0000000..d3c7c2d + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index b91bdb8..f7c3bf4 100644 +index d51bd43..c45b27f 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -97,6 +97,7 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0038-predict-held-trapdoor-placement.patch b/patches/viafabricplus-bedrock/upstreamable/0038-predict-held-trapdoor-placement.patch index 7aaaee79..3fb27fba 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0038-predict-held-trapdoor-placement.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0038-predict-held-trapdoor-placement.patch @@ -1,4 +1,4 @@ -From 1b98feab407cb99a67127b576bb27e9401389af0 Mon Sep 17 00:00:00 2001 +From 536b5b70e3d3011025b03555da7b4a796053bec9 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Wed, 28 Oct 2026 03:36:18 +0100 Subject: [PATCH] feat(interaction): preserve native held item use @@ -1054,7 +1054,7 @@ index 0000000..7a2e793 + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index f7c3bf4..416a16f 100644 +index c45b27f..cfd7975 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -92,6 +92,9 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0039-allow-food-use-on-bedrock-peaceful-difficulty.patch b/patches/viafabricplus-bedrock/upstreamable/0039-allow-food-use-on-bedrock-peaceful-difficulty.patch index 035d76a9..cd457ab6 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0039-allow-food-use-on-bedrock-peaceful-difficulty.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0039-allow-food-use-on-bedrock-peaceful-difficulty.patch @@ -1,4 +1,4 @@ -From 9baa15cd26954ae94911aa32f624628a8e252d69 Mon Sep 17 00:00:00 2001 +From 32b1b18cb3e20583cec6d05402c6c63886526263 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 1 Nov 2026 19:54:04 +0100 Subject: [PATCH] fix(items): allow food use on Bedrock Peaceful difficulty @@ -57,7 +57,7 @@ index 0000000..e8a7d8c + +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index ce75e15..ac083ae 100644 +index c1945b5..2802e52 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -64,6 +64,7 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0039-apply-native-command-stacks-to-dry-air.patch b/patches/viafabricplus-bedrock/upstreamable/0039-apply-native-command-stacks-to-dry-air.patch index 10a81fd0..f4e1d241 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0039-apply-native-command-stacks-to-dry-air.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0039-apply-native-command-stacks-to-dry-air.patch @@ -1,4 +1,4 @@ -From 1e05dca61a150524bee04ffc696afa99f433f747 Mon Sep 17 00:00:00 2001 +From 1846dcaad1be0f84c91fefa0ac5a852253e42e1e Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Thu, 29 Oct 2026 01:28:02 +0100 Subject: [PATCH] feat(fog): apply native biome and command settings @@ -591,7 +591,7 @@ index 0000000..afd7b44 + texCoord0 = UV0; +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 416a16f..ce75e15 100644 +index cfd7975..c1945b5 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -140,6 +140,9 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0040-preserve-native-occlusion-with-moreculling.patch b/patches/viafabricplus-bedrock/upstreamable/0040-preserve-native-occlusion-with-moreculling.patch index 60adeb77..7f34f31f 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0040-preserve-native-occlusion-with-moreculling.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0040-preserve-native-occlusion-with-moreculling.patch @@ -1,4 +1,4 @@ -From f99bfa7fab8df18ee6e265cd95f73a2b945326c9 Mon Sep 17 00:00:00 2001 +From 8d76ffb52724e78107a2809336b147c5fed254c1 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Mon, 2 Nov 2026 06:35:10 +0100 Subject: [PATCH] fix(blocks): preserve native occlusion with MoreCulling @@ -103,7 +103,7 @@ index 0000000..d65280d + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index ac083ae..590dad9 100644 +index 2802e52..6f23153 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -6,6 +6,7 @@ @@ -179,4 +179,3 @@ index 0000000..3ad95de +} -- 2.56.0 - diff --git a/patches/viafabricplus-bedrock/upstreamable/0041-interpolate-native-remote-player-movement.patch b/patches/viafabricplus-bedrock/upstreamable/0041-interpolate-native-remote-player-movement.patch index b0f75f66..40134771 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0041-interpolate-native-remote-player-movement.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0041-interpolate-native-remote-player-movement.patch @@ -1,4 +1,4 @@ -From 111f3c755fe09573e712afb47d9df25ba0e27fca Mon Sep 17 00:00:00 2001 +From f427243d45251e35ee00a7d96744fbd3c3c4c95e Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:51:01 +0100 Subject: [PATCH] fix(players): interpolate negotiated remote movement as @@ -779,10 +779,10 @@ index 0000000..a958a6d + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 590dad9..65afd38 100644 +index 6f23153..5376006 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -209,6 +209,9 @@ +@@ -211,6 +211,9 @@ "features.movement.MixinFireworkRocketEntity", "features.movement.MixinLocalPlayer", "features.movement.MixinPlayerCorrectionPacketListener", From 0cc15aac2aa1463a023acfb7e438fc5326f2ae5d Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Wed, 4 Nov 2026 01:19:36 +0100 Subject: [PATCH 3/4] fix(movement): use historical player modes during replay Keep local player game-mode predicates aligned with the controller's replay state. Java 26.3 reads them from a live profile that can have a later mode. Limit the override to the local player and the active replay scope. Fold the fix into the owning physics patch. Cover local ownership, remote fallback and scope cleanup in a regression, and check installed direct and proxy clients with the same bounded historical-query matrix. --- ...w-confirmed-blacklisted-server-joins.patch | 4 +- ...ompleted-local-physics-to-viabedrock.patch | 93 ++++++++++++++++--- ...ompleted-local-physics-to-viabedrock.pr.md | 4 + ...e-fence-geometry-in-bedrock-sessions.patch | 4 +- ...thoritative-projectile-owner-changes.patch | 6 +- ...9-present-authored-native-containers.patch | 4 +- ...0029-share-native-ui-scene-rendering.patch | 6 +- ...orted-native-world-actor-definitions.patch | 4 +- ...1-edit-native-command-block-settings.patch | 6 +- ...2-reconcile-native-block-break-audio.patch | 6 +- ...-animate-native-moving-piston-blocks.patch | 6 +- .../0035-forward-bedrock-fluid-pickup.patch | 4 +- ...0038-predict-held-trapdoor-placement.patch | 4 +- ...d-use-on-bedrock-peaceful-difficulty.patch | 4 +- ...ply-native-command-stacks-to-dry-air.patch | 4 +- ...ve-native-occlusion-with-moreculling.patch | 4 +- ...polate-native-remote-player-movement.patch | 6 +- 17 files changed, 122 insertions(+), 47 deletions(-) diff --git a/patches/viafabricplus-bedrock/deferred/0001-allow-confirmed-blacklisted-server-joins.patch b/patches/viafabricplus-bedrock/deferred/0001-allow-confirmed-blacklisted-server-joins.patch index ea137d60..a95c9ad0 100644 --- a/patches/viafabricplus-bedrock/deferred/0001-allow-confirmed-blacklisted-server-joins.patch +++ b/patches/viafabricplus-bedrock/deferred/0001-allow-confirmed-blacklisted-server-joins.patch @@ -1,4 +1,4 @@ -From db1e72ca9a64e12e3b04cf3f9caddf0d6619094e Mon Sep 17 00:00:00 2001 +From 0a76d82100ed213fb903e3776f371b3e141d3216 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 1 Nov 2026 14:06:07 +0100 Subject: [PATCH] feat(connection): allow confirmed blacklisted server joins @@ -247,7 +247,7 @@ index f345d7c..40e7ae9 100644 "command_block.viafabricplus.first_tick": "Execute on first tick", "base.viafabricplus.accept": "Accept", diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 5376006..aae2a90 100644 +index ddd097f..0f32d42 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -49,6 +49,8 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.patch b/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.patch index efbe00cf..0c1786de 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.patch @@ -1,4 +1,4 @@ -From 314153e0af766210ce5a61c7054acfcb13882e81 Mon Sep 17 00:00:00 2001 +From 834ba148ef9bbc4f7bef34592250f4f182f7a692 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] feat(movement): send completed local physics to ViaBedrock @@ -677,6 +677,14 @@ this hotbar change and consumes the new instant food. It sends no release transaction for that change. Preserve Java's local stop path without an extra release packet. Tests cover distinct definitions sharing a carrier, same-definition updates and absent-metadata Java identity fallback. + +Restore historical mode queries on the local player entity as well as the +movement controller. Java 26.3 Player.isSpectator and isCreative call +AbstractClientPlayer.gameMode; reading the current profile there leaks +today's mode into retained physical frames. A bounded installed query +control reproduces the split with protocol-2225 mode transitions. Keep +remote entities on their own live profiles and release the override with +the replay context. This control does not establish native trajectories. --- build.gradle.kts | 2 +- .../bedrock/ViaFabricPlusBedrock.java | 14 + @@ -688,6 +696,7 @@ same-definition updates and absent-metadata Java identity fallback. .../movement/MixinBoatPhysicsState.java | 79 +++ .../MixinClientInputPhysicsState.java | 26 + .../MixinClientLevelPhysicsReplay.java | 36 ++ + ...ixinClientPlayerGameModePhysicsReplay.java | 21 + .../MixinConnectionPhysicsReplay.java | 24 + .../movement/MixinElytraPhysicsState.java | 36 ++ .../mixin/features/movement/MixinEntity.java | 25 +- @@ -750,15 +759,15 @@ same-definition updates and absent-metadata Java identity fallback. .../movement/replay/PhysicalInput.java | 20 + .../movement/replay/PhysicalItemUse.java | 21 + .../replay/PhysicalMovementCorrection.java | 35 ++ - .../replay/PhysicalReplayContext.java | 248 ++++++++ + .../replay/PhysicalReplayContext.java | 255 +++++++++ .../replay/PhysicalReplayHistory.java | 190 +++++++ .../movement/replay/PhysicalState.java | 140 +++++ .../movement/replay/PhysicalStateAccess.java | 43 ++ .../bedrock/render/BedrockActorState.java | 39 +- .../viafabricplus-bedrock.accesswidener | 5 + - .../viafabricplus-bedrock.mixins.json | 25 + + .../viafabricplus-bedrock.mixins.json | 26 + .../BedrockPhysicalMotionLifecycleTest.java | 190 +++++++ - .../bedrock/input/BedrockPlayerModesTest.java | 168 ++++++ + .../bedrock/input/BedrockPlayerModesTest.java | 194 +++++++ .../bedrock/input/BedrockUsedItemTest.java | 66 +++ .../input/BedrockVehiclePredictionsTest.java | 155 +++++ .../input/VehiclePredictionPayloadTest.java | 75 +++ @@ -783,7 +792,7 @@ same-definition updates and absent-metadata Java identity fallback. .../replay/PhysicalWorldCollisionTest.java | 111 ++++ .../render/PhysicalColliderSourcesTest.java | 151 +++++ .../render/PhysicalReplayLifetimeTest.java | 151 +++++ - 105 files changed, 8373 insertions(+), 74 deletions(-) + 106 files changed, 8428 insertions(+), 74 deletions(-) create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/access/IBedrockFlightMotion.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/access/IBedrockPlayerPosture.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/access/IBedrockTeleportTravel.java @@ -792,6 +801,7 @@ same-definition updates and absent-metadata Java identity fallback. create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinBoatPhysicsState.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinClientInputPhysicsState.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinClientLevelPhysicsReplay.java + create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinClientPlayerGameModePhysicsReplay.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinConnectionPhysicsReplay.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinElytraPhysicsState.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinEntityCollisionReplay.java @@ -1237,6 +1247,33 @@ index 0000000..44c191c + BedrockPhysicalReplay.passengerTick((ClientLevel) (Object) this, vehicle, passenger, () -> original.call(vehicle, passenger)); + } +} +diff --git a/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinClientPlayerGameModePhysicsReplay.java b/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinClientPlayerGameModePhysicsReplay.java +new file mode 100644 +index 0000000..05aa22e +--- /dev/null ++++ b/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinClientPlayerGameModePhysicsReplay.java +@@ -0,0 +1,21 @@ ++/* ++ * This file is part of ViaFabricPlus Bedrock - https://github.com/ViaVersionAddons/viafabricplus-bedrock ++ * Copyright (C) 2026 ViaVersion and contributors ++ * SPDX-License-Identifier: GPL-3.0-or-later ++ */ ++package com.viaversion.viafabricplus.bedrock.injection.mixin.features.movement; ++ ++import com.llamalad7.mixinextras.injector.ModifyReturnValue; ++import com.viaversion.viafabricplus.bedrock.movement.replay.PhysicalReplayContext; ++import net.minecraft.client.player.AbstractClientPlayer; ++import net.minecraft.world.level.GameType; ++import org.spongepowered.asm.mixin.Mixin; ++import org.spongepowered.asm.mixin.injection.At; ++ ++@Mixin(AbstractClientPlayer.class) ++public abstract class MixinClientPlayerGameModePhysicsReplay { ++ @ModifyReturnValue(method = "gameMode", at = @At("RETURN")) ++ private GameType useRecordedPlayerMode(final GameType live) { ++ return PhysicalReplayContext.gameMode((AbstractClientPlayer) (Object) this, live); ++ } ++} diff --git a/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinConnectionPhysicsReplay.java b/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinConnectionPhysicsReplay.java new file mode 100644 index 0000000..683d816 @@ -6118,10 +6155,10 @@ index 0000000..79ccffe +} diff --git a/src/main/java/com/viaversion/viafabricplus/bedrock/movement/replay/PhysicalReplayContext.java b/src/main/java/com/viaversion/viafabricplus/bedrock/movement/replay/PhysicalReplayContext.java new file mode 100644 -index 0000000..2943d50 +index 0000000..cd6b4f9 --- /dev/null +++ b/src/main/java/com/viaversion/viafabricplus/bedrock/movement/replay/PhysicalReplayContext.java -@@ -0,0 +1,248 @@ +@@ -0,0 +1,255 @@ +/* + * This file is part of ViaFabricPlus Bedrock - https://github.com/ViaVersionAddons/viafabricplus-bedrock + * Copyright (C) 2026 ViaVersion and contributors @@ -6134,6 +6171,8 @@ index 0000000..2943d50 +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.network.Connection; ++import net.minecraft.client.Minecraft; ++import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.GameType; +import net.raphimc.viabedrock.api.model.PlayerInputPermissions; +import net.raphimc.viabedrock.api.model.PlayerModeMessage; @@ -6193,6 +6232,11 @@ index 0000000..2943d50 + return state != null && state.gameMode != null ? state.gameMode : live; + } + ++ public static GameType gameMode(final Player player, final GameType live) { ++ final State state = CURRENT.get(); ++ return state != null && state.gameMode != null && player == Minecraft.getInstance().player ? state.gameMode : live; ++ } ++ + public static void restoreGameMode(final GameType value) { + CURRENT.get().gameMode = value; + } @@ -6851,10 +6895,10 @@ index f42de8f..8e8672c 100644 accessible field net/minecraft/client/renderer/RenderPipelines ENTITY_SNIPPET Lcom/mojang/renderpearl/api/pipeline/RenderPipeline$Snippet; diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 605b96f..cfc79f2 100644 +index 605b96f..fab28a7 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -155,12 +155,37 @@ +@@ -155,12 +155,38 @@ "features.input.MixinMouseHandler", "features.input.MixinInputPermissionConnection", "features.input.MixinMinecraftInputPermissions", @@ -6877,6 +6921,7 @@ index 605b96f..cfc79f2 100644 + "features.movement.MixinPassengerPhysicsReplay", + "features.movement.MixinLevelPhysicsReplay", + "features.movement.MixinGameModePhysicsReplay", ++ "features.movement.MixinClientPlayerGameModePhysicsReplay", + "features.movement.MixinConnectionPhysicsReplay", + "features.movement.MixinSoundPhysicsReplay", + "features.movement.MixinParticlePhysicsReplay", @@ -7090,10 +7135,10 @@ index 0000000..586a485 +} diff --git a/src/test/java/com/viaversion/viafabricplus/bedrock/input/BedrockPlayerModesTest.java b/src/test/java/com/viaversion/viafabricplus/bedrock/input/BedrockPlayerModesTest.java new file mode 100644 -index 0000000..e925d06 +index 0000000..eb32b98 --- /dev/null +++ b/src/test/java/com/viaversion/viafabricplus/bedrock/input/BedrockPlayerModesTest.java -@@ -0,0 +1,168 @@ +@@ -0,0 +1,194 @@ +/* + * This file is part of ViaFabricPlus Bedrock - https://github.com/ViaVersionAddons/viafabricplus-bedrock + * Copyright (C) 2026 ViaVersion and contributors @@ -7110,6 +7155,8 @@ index 0000000..e925d06 +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.entity.player.Abilities; ++import net.minecraft.world.entity.player.Player; ++import net.minecraft.world.level.GameType; +import net.minecraft.world.phys.Vec3; +import net.raphimc.viabedrock.api.model.PlayerModeMessage; +import net.raphimc.viabedrock.api.model.PlayerModeTiming; @@ -7133,6 +7180,30 @@ index 0000000..e925d06 + } + + @Test ++ void historicalLocalModesDoNotChangeRemoteQueriesOrEscapeTheReplayScope() { ++ final var local = mock(LocalPlayer.class); ++ final var remote = mock(Player.class); ++ final var client = mock(Minecraft.class); ++ client.player = local; ++ try (var game = mockStatic(Minecraft.class)) { ++ game.when(Minecraft::getInstance).thenReturn(client); ++ assertEquals(GameType.CREATIVE, PhysicalReplayContext.gameMode(local, GameType.CREATIVE)); ++ try (var ignored = PhysicalReplayContext.enter(null, null, Set.of(local, remote))) { ++ assertEquals(GameType.CREATIVE, PhysicalReplayContext.gameMode(local, GameType.CREATIVE)); ++ for (final var historical : GameType.values()) { ++ PhysicalReplayContext.restoreGameMode(historical); ++ assertEquals(historical, PhysicalReplayContext.gameMode(local, GameType.CREATIVE)); ++ assertEquals(historical, PhysicalReplayContext.gameMode(GameType.CREATIVE)); ++ assertEquals(GameType.ADVENTURE, PhysicalReplayContext.gameMode(remote, GameType.ADVENTURE)); ++ } ++ } ++ assertEquals(GameType.CREATIVE, PhysicalReplayContext.gameMode(local, GameType.CREATIVE)); ++ assertEquals(GameType.ADVENTURE, PhysicalReplayContext.gameMode(remote, GameType.ADVENTURE)); ++ assertFalse(PhysicalReplayContext.replaying()); ++ } ++ } ++ ++ @Test + void replaysModeEventsBeforeTheirFollowingInputsAndPreservesHistoricalOwners() { + final var actor = new Actor(); + for (int i = 0; i < 6; i++) actor.tick(i); diff --git a/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.pr.md b/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.pr.md index 28bb5b34..b6d90257 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.pr.md +++ b/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.pr.md @@ -20,6 +20,10 @@ Prerequisites: Regression coverage includes `BedrockPhysicalMotionLifecycleTest`, `BedrockPlayerModesTest`, `BedrockVehiclePredictionsTest`, `VehiclePredictionPayloadTest`. +Historical mode queries use the local player's recorded mode on both the movement controller and the entity. Java 26.3 entity predicates otherwise keep reading the live profile during correction replay. Remote players retain their own profile modes, and closing the replay scope restores live queries. + +A controlled protocol-2225 replay uses the existing official 1.26.60.5-derived bootstrap with declared mode transitions. A bounded installed probe queries all four historical Java modes across five live phases on direct and proxy routes. The previous client disagrees in 15 of 20 cases. The corrected client keeps local mode, Creative/Spectator predicates, and pickability aligned with the historical mode, while remote predicates and live queries after each scope remain unchanged. `BedrockPlayerModesTest` checks local ownership, remote fallback, and scope lifetime separately. These controls establish query ownership, without proving native trajectories or correction timing. + Native and live controls establish selected movement, correction, and flight behavior. Uncommon mounts, network conditions, and mixed mechanics remain open. Bedrock 1.26.60.5 and BDS 1.26.60.6 controls cover pearl-only, wind-only, and two pearl/wind angles. diff --git a/patches/viafabricplus-bedrock/upstreamable/0026-apply-native-fence-geometry-in-bedrock-sessions.patch b/patches/viafabricplus-bedrock/upstreamable/0026-apply-native-fence-geometry-in-bedrock-sessions.patch index 3e2f6cae..e0c4069f 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0026-apply-native-fence-geometry-in-bedrock-sessions.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0026-apply-native-fence-geometry-in-bedrock-sessions.patch @@ -1,4 +1,4 @@ -From 7dd908eba8796a78fefb12f43dc4b5f8ca0e4cea Mon Sep 17 00:00:00 2001 +From b8755e58a98e02e146df551afef70b2f269773d4 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] feat(blocks): apply native fence geometry in Bedrock sessions @@ -151,7 +151,7 @@ index 0000000..4e14218 + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index cfc79f2..8301308 100644 +index fab28a7..ad52238 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -79,6 +79,7 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0027-apply-authoritative-projectile-owner-changes.patch b/patches/viafabricplus-bedrock/upstreamable/0027-apply-authoritative-projectile-owner-changes.patch index 8db696f1..43f3c1d8 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0027-apply-authoritative-projectile-owner-changes.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0027-apply-authoritative-projectile-owner-changes.patch @@ -1,4 +1,4 @@ -From 19324513a2086412843215c919b3e01beef1859e Mon Sep 17 00:00:00 2001 +From c4e8d77aa6aca46a5524850584854a5cd2a91a24 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] feat(entities): apply authoritative projectile owner changes @@ -255,10 +255,10 @@ index 0000000..0a3e377 + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 8301308..16d451d 100644 +index ad52238..91cd497 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -201,7 +201,10 @@ +@@ -202,7 +202,10 @@ "features.particle.MixinBedrockParticleRenderType", "features.render.MixinBedrockHudVisibility", "features.render.MixinMinecraftHudVisibility", diff --git a/patches/viafabricplus-bedrock/upstreamable/0029-present-authored-native-containers.patch b/patches/viafabricplus-bedrock/upstreamable/0029-present-authored-native-containers.patch index cf4908d4..560a37a8 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0029-present-authored-native-containers.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0029-present-authored-native-containers.patch @@ -1,4 +1,4 @@ -From 3edb4c933e6fefa2c5c44a219bb6892302e90bb7 Mon Sep 17 00:00:00 2001 +From e5d1f0fa52b98939e7fb49c94451bfa5875d145a Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(inventory): present authored native containers @@ -6735,7 +6735,7 @@ index d0fac3c..da0aa13 100644 "bedrock_settings.viafabricplus.allow_camera_shake": "Allow camera shake", "bedrock_settings.viafabricplus.particle_view_distance": "Particle render distance", diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 0936821..b37bed9 100644 +index 77e339e..e1f51e2 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -14,6 +14,12 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0029-share-native-ui-scene-rendering.patch b/patches/viafabricplus-bedrock/upstreamable/0029-share-native-ui-scene-rendering.patch index 499ceb85..cadbea74 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0029-share-native-ui-scene-rendering.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0029-share-native-ui-scene-rendering.patch @@ -1,4 +1,4 @@ -From 83fe770a268dc50492d3e189505ae6ae4c2231d3 Mon Sep 17 00:00:00 2001 +From 56dc126b4c6531e75c4fe2e0c0606148ccc13256 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(ui): share native scene rendering and GUI actors @@ -10358,7 +10358,7 @@ index 8e8672c..288cc7a 100644 +accessible field net/minecraft/client/gui/GuiGraphicsExtractor scissorStack Lnet/minecraft/client/gui/GuiGraphicsExtractor$ScissorStack; +accessible field net/minecraft/client/gui/GuiGraphicsExtractor$ScissorStack stack Ljava/util/Deque; diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 16d451d..0936821 100644 +index 91cd497..77e339e 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -150,6 +150,13 @@ @@ -10375,7 +10375,7 @@ index 16d451d..0936821 100644 "features.input.MixinKeyboardInput", "features.input.MixinLocalPlayerInput", "features.input.MixinClientInput", -@@ -204,7 +211,13 @@ +@@ -205,7 +212,13 @@ "features.render.MixinBedrockCameraFade", "features.entities.MixinClientEntityTracking", "features.entities.MixinMinecraftProjectileOwners", diff --git a/patches/viafabricplus-bedrock/upstreamable/0030-use-supported-native-world-actor-definitions.patch b/patches/viafabricplus-bedrock/upstreamable/0030-use-supported-native-world-actor-definitions.patch index 506574f0..406a2f19 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0030-use-supported-native-world-actor-definitions.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0030-use-supported-native-world-actor-definitions.patch @@ -1,4 +1,4 @@ -From aa187266e3cf904880e638d4a6b1731b460483e3 Mon Sep 17 00:00:00 2001 +From 318776b45c6ef11153a3f4775f00b4fb1df5c53f Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(render): use supported native world actor definitions @@ -1031,7 +1031,7 @@ index 0000000..a7d9469 + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index b37bed9..4497d10 100644 +index e1f51e2..45c0917 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -117,6 +117,7 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0031-edit-native-command-block-settings.patch b/patches/viafabricplus-bedrock/upstreamable/0031-edit-native-command-block-settings.patch index 0a2f0a84..8c0cccba 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0031-edit-native-command-block-settings.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0031-edit-native-command-block-settings.patch @@ -1,4 +1,4 @@ -From 4221143c0f42303e431cd6d3bb03d9d6713774e8 Mon Sep 17 00:00:00 2001 +From 3596380b12b4fcfcf0d70ee0084a3b01ea4a54bb Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] feat(command): edit native command block settings @@ -341,10 +341,10 @@ index da0aa13..f345d7c 100644 "base.viafabricplus.code": "Code", "base.viafabricplus.copy_link": "Copy link", diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 4497d10..8dd9568 100644 +index 45c0917..19db653 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -203,6 +203,8 @@ +@@ -204,6 +204,8 @@ "features.movement.MixinLocalPlayer", "features.movement.MixinPlayerCorrectionPacketListener", "features.movement.MixinPlayer", diff --git a/patches/viafabricplus-bedrock/upstreamable/0032-reconcile-native-block-break-audio.patch b/patches/viafabricplus-bedrock/upstreamable/0032-reconcile-native-block-break-audio.patch index 6a9237ea..412ec7a0 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0032-reconcile-native-block-break-audio.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0032-reconcile-native-block-break-audio.patch @@ -1,4 +1,4 @@ -From 80fe135988f978b0022ffa21d007de25a8721ed5 Mon Sep 17 00:00:00 2001 +From 0c2b81a4c1d4a642015a97382178c395d88a7411 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] fix(sound): reconcile native block break audio @@ -71,10 +71,10 @@ index 0000000..9f24afb + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 8dd9568..49d5336 100644 +index 19db653..df0bc1f 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -203,6 +203,7 @@ +@@ -204,6 +204,7 @@ "features.movement.MixinLocalPlayer", "features.movement.MixinPlayerCorrectionPacketListener", "features.movement.MixinPlayer", diff --git a/patches/viafabricplus-bedrock/upstreamable/0034-animate-native-moving-piston-blocks.patch b/patches/viafabricplus-bedrock/upstreamable/0034-animate-native-moving-piston-blocks.patch index 42076690..4974b82d 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0034-animate-native-moving-piston-blocks.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0034-animate-native-moving-piston-blocks.patch @@ -1,4 +1,4 @@ -From 40477b229ced229fd0e810abd06bc2a5b713c9ea Mon Sep 17 00:00:00 2001 +From c385de39f5f0b0fe3c16b14e2add9cc166cef73b Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] fix(render): animate native moving piston blocks @@ -155,10 +155,10 @@ index 0000000..f23da98 + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 49d5336..d51bd43 100644 +index df0bc1f..e837c43 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -206,6 +206,8 @@ +@@ -207,6 +207,8 @@ "features.sound.MixinBedrockMiningAudio", "features.block.MixinBedrockCommandBlockSettings", "features.inventory.MixinBedrockCommandBlockScreen", diff --git a/patches/viafabricplus-bedrock/upstreamable/0035-forward-bedrock-fluid-pickup.patch b/patches/viafabricplus-bedrock/upstreamable/0035-forward-bedrock-fluid-pickup.patch index 0c8c3e93..5e4f0bf0 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0035-forward-bedrock-fluid-pickup.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0035-forward-bedrock-fluid-pickup.patch @@ -1,4 +1,4 @@ -From f210ddaeaf7bb724c603874c213d8dbff292daac Mon Sep 17 00:00:00 2001 +From 4ce9e70e4b298aab8085040b5d1de7ed3976bdff Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:55:36 +0200 Subject: [PATCH] fix(interaction): forward Bedrock fluid pickup @@ -113,7 +113,7 @@ index 0000000..d3c7c2d + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index d51bd43..c45b27f 100644 +index e837c43..2529ebe 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -97,6 +97,7 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0038-predict-held-trapdoor-placement.patch b/patches/viafabricplus-bedrock/upstreamable/0038-predict-held-trapdoor-placement.patch index 3fb27fba..89245f71 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0038-predict-held-trapdoor-placement.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0038-predict-held-trapdoor-placement.patch @@ -1,4 +1,4 @@ -From 536b5b70e3d3011025b03555da7b4a796053bec9 Mon Sep 17 00:00:00 2001 +From b9b035c2314ede27c25a10333889c6466bb550cf Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Wed, 28 Oct 2026 03:36:18 +0100 Subject: [PATCH] feat(interaction): preserve native held item use @@ -1054,7 +1054,7 @@ index 0000000..7a2e793 + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index c45b27f..cfd7975 100644 +index 2529ebe..192d194 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -92,6 +92,9 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0039-allow-food-use-on-bedrock-peaceful-difficulty.patch b/patches/viafabricplus-bedrock/upstreamable/0039-allow-food-use-on-bedrock-peaceful-difficulty.patch index cd457ab6..a4ca87cb 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0039-allow-food-use-on-bedrock-peaceful-difficulty.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0039-allow-food-use-on-bedrock-peaceful-difficulty.patch @@ -1,4 +1,4 @@ -From 32b1b18cb3e20583cec6d05402c6c63886526263 Mon Sep 17 00:00:00 2001 +From 7ba54cb5f0ffdb9cc9bf2bee9a28114fd840ab0d Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 1 Nov 2026 19:54:04 +0100 Subject: [PATCH] fix(items): allow food use on Bedrock Peaceful difficulty @@ -57,7 +57,7 @@ index 0000000..e8a7d8c + +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index c1945b5..2802e52 100644 +index 9091a1f..401ea35 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -64,6 +64,7 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0039-apply-native-command-stacks-to-dry-air.patch b/patches/viafabricplus-bedrock/upstreamable/0039-apply-native-command-stacks-to-dry-air.patch index f4e1d241..6095e4f6 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0039-apply-native-command-stacks-to-dry-air.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0039-apply-native-command-stacks-to-dry-air.patch @@ -1,4 +1,4 @@ -From 1846dcaad1be0f84c91fefa0ac5a852253e42e1e Mon Sep 17 00:00:00 2001 +From 7e06b3414a57324f466a2472e2616806960ce7d1 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Thu, 29 Oct 2026 01:28:02 +0100 Subject: [PATCH] feat(fog): apply native biome and command settings @@ -591,7 +591,7 @@ index 0000000..afd7b44 + texCoord0 = UV0; +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index cfd7975..c1945b5 100644 +index 192d194..9091a1f 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -140,6 +140,9 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0040-preserve-native-occlusion-with-moreculling.patch b/patches/viafabricplus-bedrock/upstreamable/0040-preserve-native-occlusion-with-moreculling.patch index 7f34f31f..b7b22b62 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0040-preserve-native-occlusion-with-moreculling.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0040-preserve-native-occlusion-with-moreculling.patch @@ -1,4 +1,4 @@ -From 8d76ffb52724e78107a2809336b147c5fed254c1 Mon Sep 17 00:00:00 2001 +From 5ce93d858e3b90aa435997f1e213d19fac505f48 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Mon, 2 Nov 2026 06:35:10 +0100 Subject: [PATCH] fix(blocks): preserve native occlusion with MoreCulling @@ -103,7 +103,7 @@ index 0000000..d65280d + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 2802e52..6f23153 100644 +index 401ea35..a105991 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json @@ -6,6 +6,7 @@ diff --git a/patches/viafabricplus-bedrock/upstreamable/0041-interpolate-native-remote-player-movement.patch b/patches/viafabricplus-bedrock/upstreamable/0041-interpolate-native-remote-player-movement.patch index 40134771..ab5e6c4e 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0041-interpolate-native-remote-player-movement.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0041-interpolate-native-remote-player-movement.patch @@ -1,4 +1,4 @@ -From f427243d45251e35ee00a7d96744fbd3c3c4c95e Mon Sep 17 00:00:00 2001 +From cdf89c1075278330f3fc1eb9a40579f93644976b Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:51:01 +0100 Subject: [PATCH] fix(players): interpolate negotiated remote movement as @@ -779,10 +779,10 @@ index 0000000..a958a6d + } +} diff --git a/src/main/resources/viafabricplus-bedrock.mixins.json b/src/main/resources/viafabricplus-bedrock.mixins.json -index 6f23153..5376006 100644 +index a105991..ddd097f 100644 --- a/src/main/resources/viafabricplus-bedrock.mixins.json +++ b/src/main/resources/viafabricplus-bedrock.mixins.json -@@ -211,6 +211,9 @@ +@@ -212,6 +212,9 @@ "features.movement.MixinFireworkRocketEntity", "features.movement.MixinLocalPlayer", "features.movement.MixinPlayerCorrectionPacketListener", From 40528f9308a4990836a0b1d2ddcc1650689682d9 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Wed, 4 Nov 2026 02:02:41 +0100 Subject: [PATCH 4/4] fix(movement): retain falling motion on spectator entry Suppress Java's unconditional vertical-motion reset for Bedrock mode updates. Keep the native small-motion boundary in BedrockPlayerModes. Validated with a full add-on build, fresh replay of all four patch stacks, and native/direct/proxy walking and falling controls. Exact trajectories and transition timing remain unverified. --- ...ompleted-local-physics-to-viabedrock.patch | 26 +++++++++++++++---- ...ompleted-local-physics-to-viabedrock.pr.md | 2 ++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.patch b/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.patch index 0c1786de..62ce293f 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.patch +++ b/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.patch @@ -1,4 +1,4 @@ -From 834ba148ef9bbc4f7bef34592250f4f182f7a692 Mon Sep 17 00:00:00 2001 +From 63789630ff0e78752d6bd2a9c9573c29591ad771 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] feat(movement): send completed local physics to ViaBedrock @@ -685,6 +685,16 @@ today's mode into retained physical frames. A bounded installed query control reproduces the split with protocol-2225 mode transitions. Keep remote entities on their own live profiles and release the override with the replay context. This control does not establish native trajectories. + +Preserve native vertical motion when a player-list mode update reaches +LocalPlayer.onGameModeChanged. Java26.3 clears Y unconditionally on +Spectator entry. Official Bedrock1.26.60.5 retains a larger falling Y and +applies flight drag; only its small negative ground residue is clamped. +A live BDS1.26.60.6 fall control reproduces an artificial pause and later +correction on both Java routes. An observation-only diagnostic traces the +zero write to that Java callback. Keep native mode side effects in +BedrockPlayerModes and suppress only the Java callback's motion write, +without changing ordinary Java sessions or unrelated mode handling. --- build.gradle.kts | 2 +- .../bedrock/ViaFabricPlusBedrock.java | 14 + @@ -712,7 +722,7 @@ the replay context. This control does not establish native trajectories. .../movement/MixinLevelPhysicsReplay.java | 25 + .../features/movement/MixinLivingEntity.java | 150 +++++ .../movement/MixinLivingPhysicsState.java | 145 +++++ - .../features/movement/MixinLocalPlayer.java | 378 ++++++++++++- + .../features/movement/MixinLocalPlayer.java | 384 ++++++++++++- .../movement/MixinMobEffectPhysicsState.java | 18 + .../movement/MixinParticlePhysicsReplay.java | 24 + .../movement/MixinPassengerPhysicsReplay.java | 39 ++ @@ -792,7 +802,7 @@ the replay context. This control does not establish native trajectories. .../replay/PhysicalWorldCollisionTest.java | 111 ++++ .../render/PhysicalColliderSourcesTest.java | 151 +++++ .../render/PhysicalReplayLifetimeTest.java | 151 +++++ - 106 files changed, 8428 insertions(+), 74 deletions(-) + 106 files changed, 8434 insertions(+), 74 deletions(-) create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/access/IBedrockFlightMotion.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/access/IBedrockPlayerPosture.java create mode 100644 src/main/java/com/viaversion/viafabricplus/bedrock/injection/access/IBedrockTeleportTravel.java @@ -2406,10 +2416,10 @@ index 0000000..3cad3f3 + } +} diff --git a/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinLocalPlayer.java b/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinLocalPlayer.java -index 0e466e5..4ead330 100644 +index 0e466e5..59c993f 100644 --- a/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinLocalPlayer.java +++ b/src/main/java/com/viaversion/viafabricplus/bedrock/injection/mixin/features/movement/MixinLocalPlayer.java -@@ -21,22 +21,396 @@ +@@ -21,22 +21,402 @@ package com.viaversion.viafabricplus.bedrock.injection.mixin.features.movement; @@ -2649,6 +2659,12 @@ index 0e466e5..4ead330 100644 + return !BedrockFlightPhysics.applies(player); + } + ++ @WrapWithCondition(method = "onGameModeChanged", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;setDeltaMovement(Lnet/minecraft/world/phys/Vec3;)V")) ++ private boolean resetMotionOnlyForJavaGameModes(final LocalPlayer player, final Vec3 motion) { ++ // Native mode events apply their own downward-motion boundary after the profile update. ++ return !BedrockInputPermissions.isBedrockConnection(); ++ } ++ + @Inject(method = "aiStep", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/AbstractClientPlayer;aiStep()V")) + private void applyNativeFlightInput(final CallbackInfo ci) { + BedrockFlightPhysics.applyInput((LocalPlayer) (Object) this); diff --git a/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.pr.md b/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.pr.md index b6d90257..d9cdb546 100644 --- a/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.pr.md +++ b/patches/viafabricplus-bedrock/upstreamable/0025-send-completed-local-physics-to-viabedrock.pr.md @@ -26,6 +26,8 @@ A controlled protocol-2225 replay uses the existing official 1.26.60.5-derived b Native and live controls establish selected movement, correction, and flight behavior. Uncommon mounts, network conditions, and mixed mechanics remain open. +Fresh Bedrock 1.26.60.5 and BDS 1.26.60.6 controls cover walking and falling through Survival, Spectator, and return transitions. Native keeps larger downward motion on Spectator entry and applies flight drag; the small grounded residue clears. Java 26.3's local player-list callback instead zeros vertical motion, producing a pause on both Java routes before correction. Suppress that callback's motion write for Bedrock and keep the native boundary in `BedrockPlayerModes`. Installed direct and proxy controls check retained fall motion, the grounded boundary, and eventual landing. Both native and Java receive corrections in these controls. Packet delivery, input, camera angle, and tick phases differ, so exact trajectories and transition timing remain unverified. + Bedrock 1.26.60.5 and BDS 1.26.60.6 controls cover pearl-only, wind-only, and two pearl/wind angles. Both current Java routes produce the expected projectiles and settle after landing. Selected native, direct, and ViaProxy combinations also settle with 300 ms of incoming delivery delay, including combinations with held movement input.