Networking API prevents clients from connecting when running behind Velocity
rieverholic opened this issue ยท 3 comments
Minecraft version
1.21.1
Describe the bug
When FF Networking API is installed in the server, then Velocity with modern forwarding cannot connect the client to the server
Steps to reproduce
Note: version information is provided below.
- Set up NeoForge 21.1.180 server.
- Install FFAPI Base and Networking (and FF Loader).
- Install Velocity and properly set up modern player information forwarding with Proxy Compatible Forge.
- Join the server.
Expected behavior
Successfully connects to the server
Actual behavior
The client hangs at "Joining World..." and then eventually times out
Logs
https://gist.github.com/rieverholic/9da2b575966c1b0b1c3409a52d8783a2
Additional context
Versions
- Java: Java 21
- NeoForge: 21.1.180
- Velocity: 3.4.0-SNAPSHOT (git-fe69214e-b514)
- Forgified Fabric API Base: 0.4.42+d1308ded19
- Forgified Fabric Networking API (v1) 4.3.0+ab6ec1d119
- Proxy Compatible Forge version: 1.1.7
Additional information
- The problem does not persist when:
- Forgified Fabric Networking API is removed
- client directly connects to server without Velocity
- Proxy Compatible Forge is removed, though Velocity eventually rejects the connection
- The problem persists even when:
- Proxy Compatible Forge is replaced with similar plugins (e.g. NeoVelocity, NeoForwarding)
Just realized NeoVelocity works, not sure what I did wrong when I was testing. (cf. Gabwasnt/NeoVelocity#10 Gabwasnt/NeoVelocity#13)
I investigated a bit and found that this is because FFAPI and PCF both want to take control of handleCustomQueryPacket() of Minecraft (see here and here) and apparently PCF executes first, so FFAPI lose access to the response of the "custom" packet which is used by Velocity for modern forwarding. I wonder if there is any reasonable way to handle this?
Workaround: Replace Proxy Compatible Forge with its Fabric equivalent FabricProxy-Lite and install CrossStitch with Sinytra Connector. I hope there is a better way...

