From 547f4b9e96547c01e8ea5bce0b047694c6722980 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 2 Sep 2026 16:01:41 +0200 Subject: [PATCH] Use the proxy's online mode state on entity-metadata-rewrite server switches Upstream #3998 (dc538cb2) took the initial-login half of our temporary "Use proxy online mode state" patch, so that patch was dropped in the last upstream update. The other half applied to our own code: the Login packet that the disable_entity_metadata_rewrite path re-sends on a server switch, which went back to reporting the backend's login.isOnlineMode(). With an online-mode proxy in front of offline-mode backends the client was told true at login and false on every switch, so it would not prepare chat keys consistently. Report the pending connection's value at both sites. --- ...ide-an-option-to-disable-entity-metadata-rewriti.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BungeeCord-Patches/0043-Provide-an-option-to-disable-entity-metadata-rewriti.patch b/BungeeCord-Patches/0043-Provide-an-option-to-disable-entity-metadata-rewriti.patch index e152bc7b5..76b912849 100644 --- a/BungeeCord-Patches/0043-Provide-an-option-to-disable-entity-metadata-rewriti.patch +++ b/BungeeCord-Patches/0043-Provide-an-option-to-disable-entity-metadata-rewriti.patch @@ -1,4 +1,4 @@ -From d11fb0a8e5b920353c086c716f2cbd5a4f06b1cb Mon Sep 17 00:00:00 2001 +From 8a74d6c9d80c7b7639a3746b1bd88c8cbfea6662 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 14 Jan 2019 03:35:21 +0000 Subject: [PATCH] Provide an option to disable entity metadata rewriting @@ -57,7 +57,7 @@ index 4ff8da6d..e860214f 100644 + } } diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java -index 0340226e..0b49fcb2 100644 +index 9dbcd605..dab161a6 100644 --- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java +++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java @@ -335,6 +335,7 @@ public class ServerConnector extends PacketHandler @@ -100,7 +100,7 @@ index 0340226e..0b49fcb2 100644 + } + Login modLogin = new Login( login.getEntityId(), login.isHardcore(), login.getGameMode(), login.getPreviousGameMode(), login.getWorldNames(), login.getDimensions(), login.getDimension(), login.getWorldName(), login.getSeed(), login.getDifficulty(), + (byte) user.getPendingConnection().getListener().getTabListSize(), login.getLevelType(), login.getViewDistance(), login.getSimulationDistance(), login.isReducedDebugInfo(), login.isNormalRespawn(), login.isLimitedCrafting(), login.isDebug(), login.isFlat(), login.getDeathLocation(), -+ login.getPortalCooldown(), login.getSeaLevel(), login.isOnlineMode(), login.isSecureProfile() ); ++ login.getPortalCooldown(), login.getSeaLevel(), user.getPendingConnection().isOnlineMode(), login.isSecureProfile() ); // Waterfall - report this connection's online mode (authenticated by the proxy) so the client prepares chat keys correctly, rather than the backend's value + user.unsafe().sendPacket(modLogin); + // Only send if we're in the same dimension + if ( login.getDimension() == user.getDimension() ) // Waterfall - defer @@ -216,5 +216,5 @@ index 00000000..cb81d1dd +// Waterfall end \ No newline at end of file -- -2.54.0 +2.43.0