register Lenient C2S
abstract fun <T : CustomPayload> registerLenientC2S(id: CustomPayload.Id<T>, codec: PacketCodec<in RegistryByteBuf, T>, handler: C2SPayloadHandler<T>)
registers a server-bound (C2S) payload type and receipt handler. This does not have to be done on both server and client (hence lenient). This allows for clients without Fzzy Config to connect to a server with mods that register connections this way. A common entrypoint is typically the best place for this. * @param T the payload type to register
Author
fzzyhmstrs
Since
0.6.6, 0.6.5-fix1 for Forge 1.20.1
Parameters
id
CustomPayload.Id the id of the custom payload
codec
PacketCodec the packet codec for serializing the custom payload
handler
S2CPayloadHandler a handler for dealing with receiving the payload. This handler will be on the server handling a payload sent from the client.