timvisee / lazymc

💤 Put your Minecraft server to rest when idle.
GNU General Public License v3.0
600 stars 18 forks source link

Now you can use transfer packets instead of proxying connections #70

Open BigPebble123 opened 6 months ago

BigPebble123 commented 6 months ago

In the latest Minecraft 1.20.5 update, Microsoft has added transfer packets. The server can tell the player which server to switch to.

Quote from minecraft.net

Transfer Packets

  • Custom servers can now request that clients connect to another server with a new packet
  • When a client is transferred, it will connect to the target server with a new transfer intent (id 3)
  • By default, servers will not accept incoming transfers and will disconnect the client
  • This can be changed by setting the accepts-transfers property to true in the server.properties file
  • Resource packs are maintained across transfers
  • In the case of a transfer, custom servers can skip authenticating again with a new flag in the clientbound hello packet
timvisee commented 6 months ago

Thanks for the heads up!

I might wait a while to support this because I do want to support older clients if possible.

Also I imagine the current approach to be a bit more error prone, because Minecraft's protocol changes all the time.