Open Fallen-Breath opened 4 years ago
My guess is that you are using ViaVersion as a BungeeCord plugin, which is not supported by BungeeCord itself. Use it as Spigot plugin instead. That should fix this problem as bungee will only operate on 1.16-style data in that case.
My guess is that you are using ViaVersion as a BungeeCord plugin, which is not supported by BungeeCord itself. Use it as Spigot plugin instead. That should fix this problem as bungee will only operate on 1.16-style data in that case.
the backend servers are vanilla servers so I can't do that
In that case report the bug to ViaVersion.
To make the client think the dimension has change in all cases, sending a Resapwn packet to another dimension before sending the target dimension Respawn packet can cover is a good choice I think. It's only a 1 line tweak to solve this problem in bungeecord and won't cause any issue. This edge-case bug fixing brings better compatibility with plugins and future possibile minecraft logic changes
How to reproduce
Let's say there are 2 servers:
There is a player in serverA overworld, and he is switching to serverB (he is in the owerworld in serverB too). The player expects to see the dimension change screen for reloading the client thing when switching to serverB but he will not see that, which might cause some client desync things happen
You can reproduce this bug with any bungeecord that suports 1.16.x
For the way to switch between servers with different Minecraft version, you can use viaversion plugin for example to do so
Code analyzation
In
net.md_5.bungee.ServerConnector#handle(net.md_5.bungee.protocol.packet.Login)
method, when switching server withlogin.getDimension() instanceof Integer
, there is an if judegement to decide if an extra Respawn packet should be sent to the client, to trick the client to display the dimension change screen when switching between the same dimension on two different serverscode permalink here
However, since the type of the
dimension
field are different between <1.16 and >=1.16 (int
vsTag
orString
), this if judgement will never become true in this situation, which causes this issueHacky workaround
A hacky workaround is removing this
if ( login.getDimension() == user.getDimension() )
check and sending the Respawn packet anyway. And I think there won't be any issue except 1 more packet will be sent