c2sPacket
inline fun <T : Any> c2sPacket(id: ResourceLocation, format: BinaryFormat = Cbor): ClientToServerPacketDefinition<T>(source)
Creates a new ClientToServerPacketDefinition. This packet can only be sent from the client to the current server. 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)