记录类 PayloadRegistration<T extends CustomPacketPayload>

java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.registration.PayloadRegistration<T>
类型参数:
T - The type of the payload
记录组件:
type - The type of the payload
codec - The codec for the payload
protocols - The protocols this payload supports
flow - The flow this payload supports (empty if both)
version - The version of the payload
optional - If the payload is optional

@Internal public record PayloadRegistration<T extends CustomPacketPayload>(CustomPacketPayload.Type<T extends CustomPacketPayload> type, StreamCodec<? super RegistryFriendlyByteBuf,T extends CustomPacketPayload> codec, List<ConnectionProtocol> protocols, Optional<PacketFlow> flow, String version, boolean optional) extends Record
Holds the information needed to describe a registered payload.