Package net.minecraftforge.network
Interface PayloadChannel.Builder.ProtocolFactory<BUF extends FriendlyByteBuf,BASE extends CustomPacketPayload>
- All Superinterfaces:
ChannelBuildable<CustomPacketPayload>,PayloadConnection<BASE>
- All Known Implementing Classes:
PayloadChannel.Builder.Flow,PayloadChannel.Builder.HandlerFlow,PayloadChannel.Builder.HandlerProtocol,PayloadChannel.Builder.Protocol
- Enclosing class:
PayloadChannel.Builder
private static interface PayloadChannel.Builder.ProtocolFactory<BUF extends FriendlyByteBuf,BASE extends CustomPacketPayload>
extends PayloadConnection<BASE>, ChannelBuildable<CustomPacketPayload>
-
Method Summary
Modifier and TypeMethodDescriptiondefault Channel<CustomPacketPayload> build()ctx()default <NEWBUF extends FriendlyByteBuf,CTX, NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadHandlerProtocol<NEWBUF, NEWBASE> protocol(io.netty.util.AttributeKey<CTX> context, NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.default <NEWBUF extends FriendlyByteBuf,NEWBASE extends CustomPacketPayload>
PayloadProtocol<NEWBUF, NEWBASE> protocol(NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.Methods inherited from interface net.minecraftforge.network.payload.PayloadConnection
any, any, any, any, configuration, configuration, configuration, configuration, login, login, login, login, play, play, play, play, protocol, protocol
-
Method Details
-
ctx
-
protocol
default <NEWBUF extends FriendlyByteBuf,NEWBASE extends CustomPacketPayload> PayloadProtocol<NEWBUF,NEWBASE> protocol(NetworkProtocol<NEWBUF> protocol) Description copied from interface:PayloadConnectionCreates a builder grouping together all packets under the same protocol. This will validate that the protocol matches before the packet is sent or received.- Specified by:
protocolin interfacePayloadConnection<BUF extends FriendlyByteBuf>
-
protocol
default <NEWBUF extends FriendlyByteBuf,CTX, PayloadHandlerProtocol<NEWBUF,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> NEWBASE> protocol(io.netty.util.AttributeKey<CTX> context, NetworkProtocol<NEWBUF> protocol) Description copied from interface:PayloadConnectionCreates a builder grouping together all packets under the same protocol. This will validate that the protocol matches before the packet is sent or received.- Specified by:
protocolin interfacePayloadConnection<BUF extends FriendlyByteBuf>
-
build
- Specified by:
buildin interfaceChannelBuildable<BUF extends FriendlyByteBuf>
-