Description:
Whole handling of TransferPacket (disconnecting from old and connecting to the new server) is scheduled as a client thread task. Doing simple thing as this (code below) will commonly just kick player and not transfer it.
this.connection.send(new ClientboundTransferPacket(target.getHost(), target.getPort()));
this.connection.disconnect(Component.literal("player sent"));
What happens on the client side, I believe, is disconnect closes connection immediately and on the next game loop, PacketUtils::ensureRunningOnSameThread not handling the packet, because connection is already closed.
Linked issues
relates to 1
Comments 0
No comments.