Package net.minecraftforge.network
Interface SimpleChannel.ProtocolFactory<BUF extends FriendlyByteBuf,BASE>
- All Superinterfaces:
ChannelBuildable<Object>,SimpleBuildable,SimpleConnection<BASE>
- All Known Implementing Classes:
SimpleChannel.Flow,SimpleChannel.HandlerFlow,SimpleChannel.HandlerProtocol,SimpleChannel.Protocol
- Enclosing class:
SimpleChannel
private static interface SimpleChannel.ProtocolFactory<BUF extends FriendlyByteBuf,BASE>
extends SimpleConnection<BASE>, SimpleBuildable
-
Method Summary
Modifier and TypeMethodDescriptiondefault SimpleChannelbuild()ctx()default <NEWBUF extends FriendlyByteBuf,CTX, NEWBASE extends SimplePacket<CTX>>
SimpleHandlerProtocol<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>
SimpleProtocol<NEWBUF, NEWBASE> protocol(NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.Methods inherited from interface net.minecraftforge.network.simple.SimpleConnection
any, any, any, any, configuration, configuration, configuration, configuration, login, login, login, login, play, play, play, play, protocol, protocol
-
Method Details
-
ctx
SimpleChannel.SimpleContext<BUF,BASE> ctx() -
protocol
default <NEWBUF extends FriendlyByteBuf,NEWBASE> SimpleProtocol<NEWBUF,NEWBASE> protocol(NetworkProtocol<NEWBUF> protocol) Description copied from interface:SimpleConnectionCreates 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 interfaceSimpleConnection<BUF extends FriendlyByteBuf>
-
protocol
default <NEWBUF extends FriendlyByteBuf,CTX, SimpleHandlerProtocol<NEWBUF,NEWBASE extends SimplePacket<CTX>> NEWBASE> protocol(io.netty.util.AttributeKey<CTX> context, NetworkProtocol<NEWBUF> protocol) Description copied from interface:SimpleConnectionCreates 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 interfaceSimpleConnection<BUF extends FriendlyByteBuf>
-
build
- Specified by:
buildin interfaceChannelBuildable<BUF extends FriendlyByteBuf>- Specified by:
buildin interfaceSimpleBuildable
-