How does the Minecraft Custom Payload Pack work?

Ay
- in Mods
2

I'm trying to communicate between my spigot plugin and my MCP mod, but I find absolutely nothing helpful on the internet about how to use the custom payload packet.

How to register a channel for the client? (How the server works, I already got it)

How (or in which format) does one send a packet to the server?

How do you receive a packet in the client?

Lo

Minecraft.getMinecraft (). GetNetHandler (). SendPacket (new C17PacketCustomPayload ());

somehow so one can send the package in the client

and for reading the readPacketData method I appreciate. But it may be that you need the server packet custom payload.

Ay

Many thanks. How can I register a channel?