Open funniray opened 2 months ago
Are you sending world id and permissions on change? The server should not rely on the client asking for the request, the issue is likely because according to journeymap the dimension has not changed, so it has no need to request permissions or worldId. Which is why it is not making a request when the dimension you teleport to on the other server is the same dimension you are currently in.
I can make my plugin send the permissions and world id when the player logs in, but from what I can see, this also effects the official server side mod on forge/fabric, not just my plugin.
I know that on velocity server switches, a "reconfiguring" screen shows on the client. Is it possible to just send the worldid/permission packet whenever that happens?
I want to avoid sending the permission response packet to all players, as it can create errors/warnings in client logs when the mod isn't installed.
I want to avoid sending the permission response packet to all players, as it can create errors/warnings in client logs when the mod isn't installed.
I get that, it also doesn't help that modloaders have been removing the "minecraft:register" and "minecraft:unregister" packets to send channel lists.
I have been wanting to get away from the client initiating handshakes as well and making the server initiate it, and moving much of that to configuration packets. Which does not help your situation at all. All that will happen on the client is that it outputs a warning log that unrecognized packet showed up. I am curious though if that happens on a configuration packet, I know it happens on a play packet.
So thinking about this a bit. If the client blindly sends packets, the server will get a message that an unknown packet was received if the channel is not registered. If the server blindly sends packets, the client will get a message that an unknown packet was received if the channel is not registered.
So either way one side is going to get the message. In my opinion it is always safer for the server to initiate the handshake.
I have seen other mods with similar reports to velocity, seems velocity has issues passing the registered channels to the client when switching proxies.
Right now, journeymap on the client will not send a packet to the server if the server does not have the channel registered. I plan on changing this so if the server makes a connection to the client, it will bypass that check.
This is the check, all mod loaders have this. https://github.com/mysticdrew/common-networking/blob/d8e914248f67dc2d66eb37e573976b3a24257ca3/fabric/src/main/java/commonnetwork/networking/FabricNetworkHandler.java#L61
I have seen other mods with similar reports to velocity, seems velocity has issues passing the registered channels to the client when switching proxies. Yeah, this is because the registered channels will only handshake for the first server they join (from my understanding at least). This means that the first server they join have to have the channel registered or else nothing happens.
Additionally, velocity only appears to be proxying custom channel packets for the first server you join regardless? From my past experience, velocity will refuse to proxy custom packets unless you explicitly allow the packet.
I've used this code to force velocity to forward the packets and it seems to make it more consistent, but I've also had it work without it sometimes too? https://github.com/funniray/minimap-control/blob/proxy/proxy/src/main/java/com/funniray/minimap/proxy/VelocityPlugin.java#L46
Velocity is also a bit annoying, as "registering" a channel doesn't actually add the channel to the server's channel handshake...
What happened?
When switching between 2 different servers on velocity, journeymap doesn't appear to send
journeymap:perm_req
orworldinfo:world_id
to the server.I wrote a debug plugin for velocity that logs all journeymap related packets here: https://github.com/funniray/minimap-control/actions/runs/10667781323
The bug only occurs if you're currently in the same dimension as the server you're switching to.
Mod Loader
Fabric
Minecraft Version
1.21.x
Version
6.0.0
Relevant log output
No response