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 SimpleChannel
build()
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:SimpleConnection
Creates 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:
protocol
in 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:SimpleConnection
Creates 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:
protocol
in interfaceSimpleConnection<BUF extends FriendlyByteBuf>
-
build
- Specified by:
build
in interfaceChannelBuildable<BUF extends FriendlyByteBuf>
- Specified by:
build
in interfaceSimpleBuildable
-