s2cPacket
inline fun <T : Any> s2cPacket(id: ResourceLocation, format: BinaryFormat = Cbor): ServerToClientPacketDefinition<T>(source)
Creates a new ServerToClientPacketDefinition. This packet can only be sent from the server to one or multiple clients. 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)