TerminalMC / AutoReconnect

A client-side multi-loader Minecraft mod which automatically reconnects the client to the last known server after unintentional disconnection.
https://modrinth.com/mod/PRy8Khga
GNU Lesser General Public License v3.0
0 stars 2 forks source link

Mod reconnects me to server I was on before transfer #1

Open xSehrMotiviert opened 2 months ago

xSehrMotiviert commented 2 months ago

Request Description

Hi, I noticed that the Mod keeps reconnecting me to the server where I was on after I got transfered to another server using the transfer packet.

Here are some logs from my MC client so you can maybe use them to check if a player got transfered using the transfer packet.

[16:08:21] [Render thread/WARN]: encodeClientData(): encountered [4] sendPayload failures, cancelling any Servux join attempt(s) [16:08:32] [Render thread/INFO]: [voicechat] Clearing audio channels [16:08:32] [Render thread/INFO]: Xaero hud session finalized. [16:08:32] [Render thread/INFO]: Finalizing world map session... [16:08:32] [Thread-5/INFO]: World map force-cleaned! [16:08:32] [Render thread/INFO]: World map session finalized. [16:08:32] [Render thread/WARN]: Client disconnected with reason: Transferred to another server [16:08:32] [Render thread/INFO]: Connecting to 127.0.0.1, 25565 [16:08:34] [Render thread/INFO]: New Xaero hud session initialized! [16:08:34] [Render thread/INFO]: New world map session initialized! [16:08:34] [Render thread/INFO]: [voicechat] Sending secret request to the server [16:08:34] [Render thread/INFO]: Using 3 total BufferAllocator caches [16:08:35] [Render thread/WARN]: encodeClientData(): encountered [4] sendPayload failures, cancelling any Servux join attempt(s)

You could use the disconnect reason and the new connection to make the check and then cancel the reconnect or maybe add a button to the game menu where users could click on to go to the initial server they connected to. (Or maybe with a history. That's all up to you)

I would really love to see an update that supports server transfers.

NotRyken commented 2 months ago

Unlikely to be anything I can do packet-wise, v0.2.0 supports cancelling reconnects based on the reason message which might work for your purposes, I don't know. The build is available on the discord server if you want to try it, else I'll see about releasing it properly soon™

xSehrMotiviert commented 2 months ago

I'll join later today and test it. Thanks for the reply :D

NotRyken commented 2 months ago

It's out on Modrinth now

NotRyken commented 1 month ago

@xSehrMotiviert Were you able to determine whether this is a viable solution?