I'm currently working on an authentication system that works through the replacement of the default ServerHello packet sent during the handshake process (https://wiki.vg/Minecraft_Forge_Handshake). I have tried to do this with FMLNetworkEvent.ClientConnectedToServerEvent but it fires after the handshake process (from what I have seen by testing, correct me if I'm wrong).
The reason I want to replace the handshake packet is that most custom clients do it that way and I'm wondering if I can replicate that.
Is there a way of doing this in ANY way?