I’m currently thinking about the communication between my plugin and my mod. I would like to know if this is a good idea to upload a file through the plugin channel system or I should use my own way to exchange files between the server and the client?
The vanilla packet allows up to 0x100000 (2**20, 1048576) which is a 20-bit integer
However, in Forge, Forge allows more data to be sent using a multipart packet (over the channel FML|MP), in this case, Forge will send multiple S3FPacketCustomPayload packets and reconstruct on the other side.
This mulitpart packet allows for a maximum of 4278169680 bytes (I got this from FMLProxyPacket.MAX_LENGTH) however it will only work for Forge <–> Forge server communication (this includes SpongeForge)
I would not suggest sending large files as this could block the network for a short time while the data is written/read and processed. But IDK if it’s a problem as I’ve never had a mod send a large chunk of data at a time.