c2cPacket
inline fun <T : Any> c2cPacket(id: ResourceLocation, format: BinaryFormat = Cbor): ClientToClientPacketDefinition<T>(source)
Creates a new ClientToClientPacketDefinition. This packet can only be sent from the client to another client. The server will act as the middle man, it is responsible for forwarding this packet. The packet can only be sent in a typesafe way. The type is specified by T.
Parameters
id
the ResourceLocation allowing communication between server and client as they both know this identifier
format
(optional) the BinaryFormat instance used for serialization and deserialization of this packet (Cbor by default)