Uses of Class
net.minecraftforge.network.ChannelBuilder
-
Uses of ChannelBuilder in net.minecraftforge.network
Modifier and TypeMethodDescriptionChannelBuilder.acceptedVersions
(Channel.VersionTest test) A predicate run on both sides, with thenetworkProtocolVersion(int)
from the server, the channel on the remote side.<T> ChannelBuilder
ChannelBuilder.attribute
(io.netty.util.AttributeKey<T> key, Function<Connection, T> factory) Registers a AttributeKey to be filled when a new connection is created.<T> ChannelBuilder
Registers a AttributeKey to be filled when a new connection is created.ChannelBuilder.clientAcceptedVersions
(Channel.VersionTest test) A predicate run on the client, with thenetworkProtocolVersion(int)
from the server, the channel on the remote side.ChannelBuilder.connectionHandler
(Consumer<Connection> handler) Registers a function that will be called when a new connection is established.static ChannelBuilder
Creates a new channel builder, The name of the channel must be unique.static ChannelBuilder
ChannelBuilder.named
(ResourceLocation channelName) Creates a new channel builder, The name of the channel must be unique.ChannelBuilder.networkProtocolVersion
(int version) The impl protocol version for this channel.ChannelBuilder.optional()
Allows a client to connect to a server that is missing this channel.ChannelBuilder.optionalClient()
Tells the server to accept clients that are missing this channel.ChannelBuilder.optionalServer()
Allows a client to connect to a server that is missing this channel.ChannelBuilder.serverAcceptedVersions
(Channel.VersionTest test) A predicate run on the server, with thenetworkProtocolVersion(int)
from the server, the channel on the remote side.