fix: resolve multiplayer cache path always being UNKNOWN#211
Conversation
getBasePath() was called during handleLogin when gameMode is not yet initialized, causing all multiplayer servers and singleplayer worlds to fall into the UNKNOWN branch. Fix by computing the full storage base path in MixinClientPacketListener at handleLogin time (when getSingleplayerServer and getServerData are both available), caching it in ClientSessionEvents, and having VoxyClientInstance.getBasePath() read directly from the cache.
|
i haven't ran into this, how did you repro it? |
I encountered this issue in 1.20.1 Fabric 0.16.14. I didn't do any other operations. Do you need me to attach the mod list? |
|
sure |
Environment:
|
|
nothing jumps out at me, maybe try a minimal instance |
I tested it — without any mods, only with Voxy, there are also issues connecting to the server, and it also shows "unknown." I think it might be because the server has latency, but the read operation is relatively fast, so when it reads, the connection hasn't been established yet, which results in "unknown. |
|
Original issue happens for me too on 1.20.1 with Sinytra Connector and the ATM9 modlist, and is fixed in-game by disabling then reenabling Voxy. Doesn't seem to happen on the 1.21.1 branch. |
Can you try my version? Help me check if mine has been fixed. Thanks. |
getBasePath() was called during handleLogin when gameMode is not yet initialized, causing all multiplayer servers and singleplayer worlds to fall into the UNKNOWN branch.
Fix by computing the full storage base path in MixinClientPacketListener at handleLogin time (when getSingleplayerServer and getServerData are both available), caching it in ClientSessionEvents, and having VoxyClientInstance.getBasePath() read directly from the cache.