[BUG] [Fabric] The coordinate of the last disconnect is not saved
Mod Loader
- [x] Fabric
- [ ] Forge
Versions
- SimpleAuth 1.6.1
- Fabric API 0.22.1+build409
Describe the bug You connect in a place you disconnected several days ago but not last time
To Reproduce Steps to reproduce the behavior:
- Connect to the server
- Disconnect in one place
- Connect 3 minutes later
- Connecting and disconnecting multiple times
- Disconnect in a different place
- Connect and see that you're in the 1st place
Expected behavior Connecting in the place of your last disconnection
Additional context This has happened to 2 players in my survival
The first one has passed 2 times, has a very bad pc so sometimes when entering the server it crashes constantly until it finally manages to get in and be online for a good while
The second has a very bad internet and there are times that it is only 20 or 30 minutes just disconnecting and reconnecting, sometimes it has good connection for a few hours
My theory is that when disconnected multiple times it is not saved well and that is why the location is used 1 or 2 days before (although 3 times was only 1 day)
So if I understood correctly; player leaves on A and upon rejoining is teleported to B (spawn). After successful login, player is teleported to A again. However when they stop playing (on C) they are teleported to A once more?
Humm, after lots of tries I cannot seem to be able to reproduce this. Even Alt+F4-ing the game during connection proccess it seems to be working normally ...
So if I understood correctly; player leaves on A and upon rejoining is teleported to B (spawn). After successful login, player is teleported to A again. However when they stop playing (on C) they are teleported to A once more?
something like this, if it goes into the server and had disconnected into B, it connects to A, then if the player has bad connection is disconnected after moving a few blocks, then when connecting it is back in A, then it repeats this a few times until it has stable connection, when it has already been connecting several minutes and disconnects in C it does not happen again
More in context with what happened to the players of my survival:
The first player built his house, I put some logs, then he had to go (A), the next day he came and finished his house (B), the next day he connected where he had disconnected when he built the house (A), was inside logs and after loging he began to suffocate, after moving 2 or 3 blocks he left the connection (C) and when he returned he was back in the logs suffocating (A) , this is repeated a few times until it ends halfway through life with full netherite, when you get a stable connection and it doesn't last less than 2 minutes you end up decorating the inside of your home (D) and the next time you connect it's all right
The second player was looking for elitras in the end, disconnected in 2k (A), the next day he leaves as he had almost no food, then goes home (B), is a while disconnecting and connecting, that night when he has stable connection he will fight the dragon, dies, I do not know where he disconnected but I guess it was at home recovering his things (C) , the next day he comes and is in A
I think #34 could be related. What is described here and above is also what happens in #34:
- Player connects at location A, leaves at location B
- Player connects at location B, enters a wrong password and gets kicked
- Player connects back again, this time at location A.
Sadly, I don't have access to a Fabric server anymore, because the one I was having the issues with closed shortly after I opened #34. I think this command could be a way to test it easily, but I'm not sure.
public class FooCommand {
public static void register(CommandDispatcher dispatcher) {
dispatcher.register(CommandManager.literal("foo").executes(context -> {
ServerPlayerEntity player = context.getSource().getPlayer();
player.networkHandler.disconnect(new LiteralText("Foo command"));
return 1;
}));
}
}
Humm, how to describe this ...
It's normal that players get TP-ed around if you use spawnOnJoin, it's not normal, however, that they are not TP-ed back when they enter right password.
I'll try to reproduce it with above command, but I doubt it works differently than normal wrong password disconnect ..?
You can also enable debugMode in config, to see what's happening behind the scenes.