Uses of Class
net.minecraft.network.Connection
Package
Description
Events fired only on the client-side, chiefly related to rendering and user interfaces (screens and input).
-
Uses of Connection in net.minecraft.client
-
Uses of Connection in net.minecraft.client.gui.screens
-
Uses of Connection in net.minecraft.client.gui.screens.multiplayer
-
Uses of Connection in net.minecraft.client.multiplayer
Modifier and TypeFieldDescriptionprotected final Connection
ClientCommonPacketListenerImpl.connection
private final Connection
ClientHandshakePacketListenerImpl.connection
ModifierConstructorDescriptionprotected
ClientCommonPacketListenerImpl
(Minecraft p_300051_, Connection p_300688_, CommonListenerCookie p_300429_) ClientConfigurationPacketListenerImpl
(Minecraft p_301278_, Connection p_299257_, CommonListenerCookie p_300907_) ClientHandshakePacketListenerImpl
(Connection p_261697_, Minecraft p_261835_, ServerData p_261938_, Screen p_261783_, boolean p_261562_, Duration p_261673_, Consumer<Component> p_261945_) ClientPacketListener
(Minecraft p_253924_, Connection p_253614_, CommonListenerCookie p_298329_) -
Uses of Connection in net.minecraft.client.resources.server
Modifier and TypeMethodDescriptionvoid
DownloadedPackSource.configureForServerControl
(Connection p_310083_, ServerPackManager.PackPromptStatus p_309566_) private static PackLoadFeedback
DownloadedPackSource.createPackResponseSender
(Connection p_312565_) -
Uses of Connection in net.minecraft.network
Modifier and TypeFieldDescriptionprivate Consumer<Connection>
Connection.activationHandler
private final Queue<Consumer<Connection>>
Connection.pendingActions
Modifier and TypeMethodDescriptionstatic Connection
Connection.connectToLocalServer
(SocketAddress p_129494_) static Connection
Connection.connectToServer
(InetSocketAddress p_178301_, boolean p_178302_, SampleLogger p_300093_) Modifier and TypeMethodDescriptionstatic io.netty.channel.ChannelFuture
Connection.connect
(InetSocketAddress p_290034_, boolean p_290035_, Connection p_290031_) Modifier and TypeMethodDescriptionvoid
Connection.runOnceConnected
(Consumer<Connection> p_297681_) -
Uses of Connection in net.minecraft.realms
-
Uses of Connection in net.minecraft.server.network
Modifier and TypeFieldDescriptionprivate final Connection
MemoryServerHandshakePacketListenerImpl.connection
protected final Connection
ServerCommonPacketListenerImpl.connection
private final Connection
ServerHandshakePacketListenerImpl.connection
(package private) final Connection
ServerLoginPacketListenerImpl.connection
private final Connection
ServerStatusPacketListenerImpl.connection
Modifier and TypeFieldDescription(package private) final List<Connection>
ServerConnectionListener.connections
ModifierConstructorDescriptionMemoryServerHandshakePacketListenerImpl
(MinecraftServer p_9691_, Connection p_9692_) ServerCommonPacketListenerImpl
(MinecraftServer p_299469_, Connection p_300872_, CommonListenerCookie p_300277_) ServerConfigurationPacketListenerImpl
(MinecraftServer p_301415_, Connection p_298106_, CommonListenerCookie p_301309_) ServerGamePacketListenerImpl
(MinecraftServer p_9770_, Connection p_9771_, ServerPlayer p_9772_, CommonListenerCookie p_300908_) ServerHandshakePacketListenerImpl
(MinecraftServer p_9969_, Connection p_9970_) ServerLoginPacketListenerImpl
(MinecraftServer p_10027_, Connection p_10028_) ServerStatusPacketListenerImpl
(ServerStatus p_272864_, Connection p_273586_) ServerStatusPacketListenerImpl
(ServerStatus p_272864_, Connection p_273586_, @Nullable String statusCache) -
Uses of Connection in net.minecraft.server.players
Modifier and TypeMethodDescriptionvoid
PlayerList.placeNewPlayer
(Connection p_11262_, ServerPlayer p_11263_, CommonListenerCookie p_297215_) -
Uses of Connection in net.minecraftforge.client
Modifier and TypeMethodDescriptionprivate static Connection
ForgeHooksClient.getClientConnection()
Modifier and TypeMethodDescriptionstatic void
ForgeHooksClient.firePlayerLogin
(MultiPlayerGameMode pc, LocalPlayer player, Connection networkManager) static void
ForgeHooksClient.firePlayerRespawn
(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager) static boolean
ForgeHooksClient.onClientDisconnect
(Connection connection, Minecraft mc, Screen parent, Component message) -
Uses of Connection in net.minecraftforge.client.event
Modifier and TypeMethodDescriptionClientPlayerNetworkEvent.getConnection()
Returns the network connection for the player.@Nullable Connection
ClientPlayerNetworkEvent.LoggingOut.getConnection()
Returns the network connection for the player, may benull
.ModifierConstructorDescriptionprotected
ClientPlayerNetworkEvent
(MultiPlayerGameMode multiPlayerGameMode, LocalPlayer player, Connection connection) Clone
(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager) LoggingIn
(MultiPlayerGameMode controller, LocalPlayer player, Connection networkManager) LoggingOut
(@Nullable MultiPlayerGameMode controller, @Nullable LocalPlayer player, @Nullable Connection networkManager) -
Uses of Connection in net.minecraftforge.common
Modifier and TypeMethodDescriptionstatic void
ForgeHooks.handleClientConfigurationComplete
(Connection connection) static boolean
ForgeHooks.onCustomPayload
(ICustomPacket<?> packet, Connection connection) -
Uses of Connection in net.minecraftforge.common.extensions
Modifier and TypeMethodDescriptiondefault void
IForgeBlockEntity.onDataPacket
(Connection net, ClientboundBlockEntityDataPacket pkt) Called when you receive a TileEntityData packet for the location this TileEntity is currently in. -
Uses of Connection in net.minecraftforge.common.util
-
Uses of Connection in net.minecraftforge.event
Modifier and TypeMethodDescriptionstatic void
ForgeEventFactory.gatherLoginConfigTasks
(Connection connection, Consumer<ConfigurationTask> add) static void
ForgeEventFactory.onChannelRegistrationChange
(Connection connection, ChannelRegistrationChangeEvent.Type changeType, HashSet<ResourceLocation> changed) static void
ForgeEventFactory.onConnectionStart
(Connection connection) -
Uses of Connection in net.minecraftforge.event.network
Modifier and TypeFieldDescriptionprivate final Connection
ConnectionStartEvent.connection
private final Connection
CustomPayloadEvent.Context.connection
TheConnection
for this message.private final Connection
GatherLoginConfigurationTasksEvent.connection
private final Connection
ChannelRegistrationChangeEvent.source
Modifier and TypeMethodDescriptionConnectionStartEvent.getConnection()
CustomPayloadEvent.Context.getConnection()
GatherLoginConfigurationTasksEvent.getConnection()
ChannelRegistrationChangeEvent.getSource()
ModifierConstructorDescriptionChannelRegistrationChangeEvent
(Connection source, ChannelRegistrationChangeEvent.Type changeType, Set<ResourceLocation> channels) ConnectionStartEvent
(Connection connection) Context
(Connection connection, NetworkDirection networkDirection) GatherLoginConfigurationTasksEvent
(Connection connection, Consumer<ConfigurationTask> add) -
Uses of Connection in net.minecraftforge.network
Modifier and TypeFieldDescriptionprivate Map<io.netty.util.AttributeKey<?>,
Function<Connection, ?>> ChannelBuilder.attributes
(package private) final Map<io.netty.util.AttributeKey<?>,
Function<Connection, ?>> NetworkInstance.attributes
(package private) final Consumer<Connection>
NetworkInstance.channelHandler
private Consumer<Connection>
ChannelBuilder.connectionHandler
static final PacketDistributor<List<Connection>>
PacketDistributor.NMLIST
Send to the supplied list of NetworkManager instances in the Supplier
PacketDistributor.with(T)
List of NetworkManagerModifier and TypeMethodDescriptionstatic void
ChannelListManager.addChannels
(Connection connection) static void
ChannelListManager.addChannels
(Connection connection, Collection<ResourceLocation> channels) static void
ChannelListManager.addChannels
(Connection connection, ResourceLocation... channels) static NetworkContext
NetworkContext.get
(Connection connection) Gets the associated NetworkContext from the connection, creating a new instance if necessary.boolean
Channel.isRemotePresent
(Connection connection) Returns true if the channel is present in the given connection.static void
NetworkRegistry.onConnectionStart
(Connection connection) static void
ChannelListManager.removeChannels
(Connection connection, Collection<ResourceLocation> channels) static void
ChannelListManager.removeChannels
(Connection connection, ResourceLocation... channels) void
Channel.send
(MSG msg, Connection connection) private static void
ChannelListManager.sendChannels
(EventNetworkChannel channel, Connection connection, Collection<ResourceLocation> channels) (package private) Packet<?>
Channel.toVanillaPacket
(Connection connection, MSG message) Modifier and TypeMethodDescription<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.ChannelBuilder.connectionHandler
(Consumer<Connection> handler) Registers a function that will be called when a new connection is established.PacketDistributor.networkManagerList
(List<Connection> connections) ModifierConstructorDescription(package private)
ForgePacketHandler
(Connection connection) private
NetworkContext
(Connection connection) ModifierConstructorDescription(package private)
NetworkInstance
(ResourceLocation channelName, int networkProtocolVersion, Channel.VersionTest clientAcceptedVersions, Channel.VersionTest serverAcceptedVersions, Map<io.netty.util.AttributeKey<?>, Function<Connection, ?>> attributes, Consumer<Connection> channelHandler) (package private)
NetworkInstance
(ResourceLocation channelName, int networkProtocolVersion, Channel.VersionTest clientAcceptedVersions, Channel.VersionTest serverAcceptedVersions, Map<io.netty.util.AttributeKey<?>, Function<Connection, ?>> attributes, Consumer<Connection> channelHandler) -
Uses of Connection in net.minecraftforge.network.config
ModifierConstructorDescriptionConfigurationTaskContext
(Connection connection, Consumer<Packet<?>> send, Consumer<ConfigurationTask.Type> finish) -
Uses of Connection in net.minecraftforge.network.filters
Modifier and TypeFieldDescriptionprivate static final Map<String,
Function<Connection, VanillaPacketFilter>> NetworkFilters.instances
Modifier and TypeMethodDescriptionstatic void
NetworkFilters.injectIfNecessary
(Connection manager) protected boolean
VanillaConnectionNetworkFilter.isNecessary
(Connection connection) protected abstract boolean
VanillaPacketFilter.isNecessary
(Connection manager) Whether this filter is necessary on the given connection. -
Uses of Connection in net.minecraftforge.server
Modifier and TypeMethodDescriptionstatic boolean
ServerLifecycleHooks.handleServerLogin
(ClientIntentionPacket packet, Connection connection) private static boolean
ServerLifecycleHooks.rejectConnection
(Connection connection, ConnectionType type, String message)