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 TypeFieldDescriptionfinal Connection
ClientCommonPacketListenerImpl.connection
private final Connection
ClientHandshakePacketListenerImpl.connection
ModifierConstructorDescriptionprotected
ClientCommonPacketListenerImpl
(Minecraft p_295454_, Connection p_294773_, CommonListenerCookie p_294647_) ClientConfigurationPacketListenerImpl
(Minecraft p_295262_, Connection p_296339_, CommonListenerCookie p_294706_) 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_295121_) -
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_298674_) 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_294674_) -
Uses of Connection in net.minecraft.realms
-
Uses of Connection in net.minecraft.server.network
Modifier and TypeFieldDescriptionprivate final Connection
MemoryServerHandshakePacketListenerImpl.connection
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_295057_, Connection p_294822_, CommonListenerCookie p_301980_) ServerConfigurationPacketListenerImpl
(MinecraftServer p_294645_, Connection p_295787_, CommonListenerCookie p_302003_) ServerGamePacketListenerImpl
(MinecraftServer p_9770_, Connection p_9771_, ServerPlayer p_9772_, CommonListenerCookie p_301978_) 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_301988_) -
Uses of Connection in net.neoforged.neoforge.client
Modifier and TypeMethodDescriptionstatic void
ClientHooks.firePlayerLogin
(MultiPlayerGameMode pc, LocalPlayer player, Connection networkManager) static void
ClientHooks.firePlayerRespawn
(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager) -
Uses of Connection in net.neoforged.neoforge.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.neoforged.neoforge.common.extensions
Modifier and TypeMethodDescriptiondefault void
IBlockEntityExtension.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.neoforged.neoforge.common.util
Modifier and TypeFieldDescriptionprivate static final Connection
FakePlayer.FakePlayerNetHandler.DUMMY_CONNECTION
-
Uses of Connection in net.neoforged.neoforge.debug.block
Modifier and TypeMethodDescriptionvoid
FullPotsAccessorDemo.DioriteFlowerPotBlockEntity.onDataPacket
(Connection net, ClientboundBlockEntityDataPacket pkt) void
LevelSensitiveLightBlockTest.LightBlockEntity.onDataPacket
(Connection net, ClientboundBlockEntityDataPacket pkt) -
Uses of Connection in net.neoforged.neoforge.debug.client.model
Modifier and TypeMethodDescriptionvoid
CustomItemDisplayContextTest.ItemHangerBlockEntity.onDataPacket
(Connection net, ClientboundBlockEntityDataPacket pkt) -
Uses of Connection in net.neoforged.neoforge.event.entity.player
ModifierConstructorDescriptionPlayerNegotiationEvent
(Connection connection, com.mojang.authlib.GameProfile profile, List<Future<Void>> futures) -
Uses of Connection in net.neoforged.neoforge.network
Modifier and TypeFieldDescriptionprivate final Connection
HandshakeHandler.manager
private final Connection
NetworkEvent.PacketDispatcher.NetworkManagerDispatcher.manager
private final Connection
NetworkEvent.Context.networkManager
TheConnection
for this message.Modifier and TypeFieldDescriptionstatic final PacketDistributor<List<Connection>>
PacketDistributor.NMLIST
Send to the supplied list of NetworkManager instances in the Supplier
PacketDistributor.with(Supplier)
List of NetworkManagerModifier and TypeMethodDescriptionvoid
MCRegisterPacketHandler.addChannels
(Set<ResourceLocation> locations, Connection manager) (package private) static void
NetworkHooks.appendConnectionData
(Connection mgr, Map<String, org.apache.commons.lang3.tuple.Pair<String, String>> modData, Map<ResourceLocation, String> channels) Updates the current ConnectionData instance with new mod or channel data if the old instance did not have either of these yet, or creates a new ConnectionData instance with the new data if the current ConnectionData instance doesn't exist yet.(package private) boolean
NetworkInstance.dispatch
(LoginNetworkDirection side, ICustomQueryPayloadWithBuffer packet, Connection manager) (package private) boolean
NetworkInstance.dispatch
(PlayNetworkDirection side, ICustomPacketPayloadWithBuffer packet, Connection manager) NetworkHooks.getChannelList
(Connection mgr) static @Nullable ConnectionData
NetworkHooks.getConnectionData
(Connection mgr) private static MCRegisterPacketHandler.ChannelList
MCRegisterPacketHandler.getFrom
(Connection manager) static @Nullable ConnectionData.ModMismatchData
NetworkHooks.getModMismatchData
(Connection mgr) static void
NetworkHooks.handleClientLoginSuccess
(Connection manager) boolean
NetworkInstance.isRemotePresent
(Connection manager) static boolean
NetworkHooks.isVanillaConnection
(Connection manager) static boolean
NetworkHooks.onCustomPayload
(Packet<?> packet, ICustomPacketPayloadWithBuffer payload, Connection manager) static boolean
NetworkHooks.onCustomQuery
(Packet<?> packet, ICustomQueryPayloadWithBuffer payload, Connection manager) static boolean
HandshakeHandler.packetNeedsResponse
(Connection mgr, int packetPosition) Helper method to determine if the S2C packet at the given packet position needs a response in form of a packet handled inHandshakeHandler.handleIndexedMessage(MSG, net.neoforged.neoforge.network.NetworkEvent.Context)
for the handshake to progress.static void
NetworkHooks.registerClientLoginChannel
(Connection manager) (package private) static void
HandshakeHandler.registerHandshake
(Connection manager, LoginNetworkDirection direction) Create a new handshake instance.static void
NetworkHooks.registerServerLoginChannel
(Connection manager, ClientIntentionPacket packet) static void
NetworkHooks.sendMCRegistryPackets
(Connection manager, PlayNetworkDirection direction) void
MCRegisterPacketHandler.sendRegistry
(Connection manager, PlayNetworkDirection dir) (package private) void
LoginWrapper.sendServerToClientLoginPacket
(ResourceLocation resourceLocation, FriendlyByteBuf buffer, int index, Connection manager) (package private) static boolean
HandshakeHandler.tickLogin
(Connection networkManager) static boolean
NetworkHooks.tickNegotiation
(Connection networkManager) static void
NetworkHooks.validatePacketDirection
(INetworkDirection<?> packetDirection, Optional<INetworkDirection<?>> expectedDirection, Connection connection) private static boolean
NetworkHooks.validateSideForProcessing
(Packet<?> packet, ICustomPacketPayloadWithBuffer payload, NetworkInstance ni, Connection manager) private static boolean
NetworkHooks.validateSideForProcessing
(Packet<?> packet, ICustomQueryPayloadWithBuffer payload, NetworkInstance ni, Connection manager) Modifier and TypeMethodDescriptionstatic ConnectionType
NetworkHooks.getConnectionType
(Supplier<Connection> connection) PacketDistributor.networkManagerList
(Supplier<List<Connection>> nmListSupplier) ModifierConstructorDescription(package private)
Context
(Connection netHandler, INetworkDirection<?> networkDirection, int index) (package private)
Context
(Connection networkManager, INetworkDirection<?> networkDirection, BiConsumer<ResourceLocation, FriendlyByteBuf> packetSink) (package private)
Context
(Connection networkManager, INetworkDirection<?> networkDirection, NetworkEvent.PacketDispatcher dispatcher) private
HandshakeHandler
(Connection networkManager, LoginNetworkDirection side) (package private)
NetworkManagerDispatcher
(Connection manager, int packetIndex, BiFunction<INetworkDirection.PacketData, ResourceLocation, Packet<?>> customPacketSupplier) -
Uses of Connection in net.neoforged.neoforge.network.event
Modifier and TypeMethodDescriptionboolean
EventNetworkChannel.isRemotePresent
(Connection manager) -
Uses of Connection in net.neoforged.neoforge.network.filters
Modifier and TypeFieldDescriptionprivate static final Map<String,
Function<Connection, VanillaPacketFilter>> NetworkFilters.instances
Modifier and TypeMethodDescriptionNeoForgeConnectionNetworkFilter.buildHandlers
(@Nullable Connection manager) VanillaPacketSplitter.getRemoteCompatibility
(Connection manager) static void
NetworkFilters.injectIfNecessary
(Connection manager) protected boolean
NeoForgeConnectionNetworkFilter.isNecessary
(Connection manager) protected boolean
VanillaConnectionNetworkFilter.isNecessary
(Connection manager) protected abstract boolean
VanillaPacketFilter.isNecessary
(Connection manager) Whether this filter is necessary on the given connection.static boolean
VanillaPacketSplitter.isRemoteCompatible
(Connection manager) -
Uses of Connection in net.neoforged.neoforge.network.simple
Modifier and TypeMethodDescriptionboolean
SimpleChannel.isRemotePresent
(Connection manager) Returnstrue
if the channel is present in the given connection.<MSG> void
SimpleChannel.sendTo
(MSG message, Connection manager, PlayNetworkDirection direction) -
Uses of Connection in net.neoforged.neoforge.server
Modifier and TypeMethodDescriptionstatic boolean
ServerLifecycleHooks.handleServerLogin
(ClientIntentionPacket packet, Connection manager) private static void
ServerLifecycleHooks.rejectConnection
(Connection manager, ConnectionType type, String message)