Interface PayloadHandlerFlow<BUF extends FriendlyByteBuf,BASE extends CustomPacketPayload> 
- All Superinterfaces:
- BaseProtocol<PayloadHandlerFlow<BUF,,- BASE>, - PayloadHandlerProtocol<BUF, - BASE>> - ChannelBuildable<CustomPacketPayload>,- PayloadConnection<BASE>,- PayloadHandlerProtocol<BUF,- BASE> 
- All Known Implementing Classes:
- PayloadChannel.Builder.HandlerFlow
public interface PayloadHandlerFlow<BUF extends FriendlyByteBuf,BASE extends CustomPacketPayload> 
extends PayloadHandlerProtocol<BUF,BASE>, ChannelBuildable<CustomPacketPayload> 
- 
Method SummaryModifier and TypeMethodDescription<MSG extends BASE>
 PayloadHandlerFlow<BUF, BASE> add(CustomPacketPayload.Type<MSG> type, StreamCodec<BUF, MSG> codec) Adds a packet to this channel that has it's protocol validated whenever sent or received.<MSG extends BASE>
 PayloadHandlerFlow<BUF, BASE> add(CustomPacketPayload.Type<MSG> type, StreamCodec<BUF, MSG> codec, BiConsumer<MSG, CustomPayloadEvent.Context> handler) Adds a packet to this channel that has it's protocol validated whenever sent or received.<MSG extends BASE>
 PayloadHandlerFlow<BUF, BASE> addMain(CustomPacketPayload.Type<MSG> type, StreamCodec<BUF, MSG> codec) Adds a packet to this channel that has it's protocol validated whenever sent or received.Methods inherited from interface net.minecraftforge.network.simple.BaseProtocolbidirectional, bidirectional, clientbound, clientbound, flow, flow, flow, serverbound, serverboundMethods inherited from interface net.minecraftforge.network.ChannelBuildablebuildMethods inherited from interface net.minecraftforge.network.payload.PayloadConnectionany, any, any, any, configuration, configuration, configuration, configuration, login, login, login, login, play, play, play, play, protocol, protocol, protocol, protocol
- 
Method Details- 
add<MSG extends BASE> PayloadHandlerFlow<BUF,BASE> add(CustomPacketPayload.Type<MSG> type, StreamCodec<BUF, MSG> codec) Adds a packet to this channel that has it's protocol validated whenever sent or received.The handler is called on the network thread, and so should not interact with most game state by default. CustomPayloadEvent.Context.enqueueWork(Runnable)can be used to handle the message on the main server or client thread. Alternatively one can useto run the handler on the main thread.invalid reference#addMain(Class, StreamCodec)
- 
addMain<MSG extends BASE> PayloadHandlerFlow<BUF,BASE> addMain(CustomPacketPayload.Type<MSG> type, StreamCodec<BUF, MSG> codec) Adds a packet to this channel that has it's protocol validated whenever sent or received.Unlike add(Type,StreamCodec), the consumer is called on the main thread, and so can interact with most game state by default.
- 
add<MSG extends BASE> PayloadHandlerFlow<BUF,BASE> add(CustomPacketPayload.Type<MSG> type, StreamCodec<BUF, MSG> codec, BiConsumer<MSG, CustomPayloadEvent.Context> handler) Adds a packet to this channel that has it's protocol validated whenever sent or received.The handler is called on the network thread, and so should not interact with most game state by default. CustomPayloadEvent.Context.enqueueWork(Runnable)can be used to handle the message on the main server or client thread.
 
-