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.multiplayer
Modifier and TypeFieldDescriptionprivate final Connection
ClientHandshakePacketListenerImpl.connection
private final Connection
ClientPacketListener.connection
Modifier and TypeMethodDescriptionClientHandshakePacketListenerImpl.getConnection()
ClientPacketListener.getConnection()
ModifierConstructorDescriptionClientHandshakePacketListenerImpl
(Connection p_104526_, Minecraft p_104527_, Screen p_104528_, Consumer<Component> p_104529_) ClientPacketListener
(Minecraft p_194193_, Screen p_194194_, Connection p_194195_, com.mojang.authlib.GameProfile p_194196_, ClientTelemetryManager p_194197_) -
Uses of Connection in net.minecraft.network
Modifier and TypeMethodDescriptionstatic Connection
Connection.connectToLocalServer
(SocketAddress p_129494_) static Connection
Connection.connectToServer
(InetSocketAddress p_178301_, boolean p_178302_) PacketListener.getConnection()
-
Uses of Connection in net.minecraft.realms
-
Uses of Connection in net.minecraft.server.network
Modifier and TypeFieldDescriptionprivate final Connection
MemoryServerHandshakePacketListenerImpl.connection
final Connection
ServerGamePacketListenerImpl.connection
private final Connection
ServerHandshakePacketListenerImpl.connection
final Connection
ServerLoginPacketListenerImpl.connection
private final Connection
ServerStatusPacketListenerImpl.connection
Modifier and TypeFieldDescription(package private) final List<Connection>
ServerConnectionListener.connections
Modifier and TypeMethodDescriptionMemoryServerHandshakePacketListenerImpl.getConnection()
ServerGamePacketListenerImpl.getConnection()
ServerHandshakePacketListenerImpl.getConnection()
ServerLoginPacketListenerImpl.getConnection()
ServerStatusPacketListenerImpl.getConnection()
ModifierConstructorDescriptionMemoryServerHandshakePacketListenerImpl
(MinecraftServer p_9691_, Connection p_9692_) ServerGamePacketListenerImpl
(MinecraftServer p_9770_, Connection p_9771_, ServerPlayer p_9772_) ServerHandshakePacketListenerImpl
(MinecraftServer p_9969_, Connection p_9970_) ServerLoginPacketListenerImpl
(MinecraftServer p_10027_, Connection p_10028_) ServerStatusPacketListenerImpl
(MinecraftServer p_10087_, Connection p_10088_) -
Uses of Connection in net.minecraft.server.players
Modifier and TypeMethodDescriptionvoid
PlayerList.placeNewPlayer
(Connection p_11262_, ServerPlayer p_11263_) -
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) -
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.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
Modifier and TypeFieldDescriptionprivate static final Connection
FakePlayer.FakePlayerNetHandler.DUMMY_CONNECTION
-
Uses of Connection in net.minecraftforge.debug.block
Modifier and TypeMethodDescriptionvoid
FullPotsAccessorDemo.DioriteFlowerPotBlockEntity.onDataPacket
(Connection net, ClientboundBlockEntityDataPacket pkt) -
Uses of Connection in net.minecraftforge.debug.client.model
Modifier and TypeMethodDescriptionvoid
CustomTransformTypeTest.ItemHangerBlockEntity.onDataPacket
(Connection net, ClientboundBlockEntityDataPacket pkt) -
Uses of Connection in net.minecraftforge.event.entity.player
ModifierConstructorDescriptionPlayerNegotiationEvent
(Connection connection, com.mojang.authlib.GameProfile profile, List<Future<Void>> futures) -
Uses of Connection in net.minecraftforge.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
(NetworkDirection side, ICustomPacket<?> 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
(ICustomPacket<?> packet, 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, java.util.function.Supplier<net.minecraftforge.network.NetworkEvent.Context>)
for the handshake to progress.static void
NetworkHooks.registerClientLoginChannel
(Connection manager) (package private) static void
HandshakeHandler.registerHandshake
(Connection manager, NetworkDirection direction) Create a new handshake instance.static void
NetworkHooks.registerServerLoginChannel
(Connection manager, ClientIntentionPacket packet) static void
NetworkHooks.sendMCRegistryPackets
(Connection manager, String direction) void
MCRegisterPacketHandler.sendRegistry
(Connection manager, NetworkDirection 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
(ServerLoginPacketListenerImpl netHandlerLoginServer, Connection networkManager, ServerPlayer player) static void
NetworkHooks.validatePacketDirection
(NetworkDirection packetDirection, Optional<NetworkDirection> expectedDirection, Connection connection) private static boolean
NetworkHooks.validateSideForProcessing
(ICustomPacket<?> packet, 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, NetworkDirection networkDirection, int index) (package private)
Context
(Connection networkManager, NetworkDirection networkDirection, BiConsumer<ResourceLocation, FriendlyByteBuf> packetSink) (package private)
Context
(Connection networkManager, NetworkDirection networkDirection, NetworkEvent.PacketDispatcher dispatcher) private
HandshakeHandler
(Connection networkManager, NetworkDirection side) (package private)
NetworkManagerDispatcher
(Connection manager, int packetIndex, BiFunction<org.apache.commons.lang3.tuple.Pair<FriendlyByteBuf, Integer>, ResourceLocation, ICustomPacket<?>> customPacketSupplier) -
Uses of Connection in net.minecraftforge.network.event
Modifier and TypeMethodDescriptionboolean
EventNetworkChannel.isRemotePresent
(Connection manager) -
Uses of Connection in net.minecraftforge.network.filters
Modifier and TypeFieldDescriptionprivate static final Map<String,
Function<Connection, VanillaPacketFilter>> NetworkFilters.instances
Modifier and TypeMethodDescriptionForgeConnectionNetworkFilter.buildHandlers
(@Nullable Connection manager) VanillaPacketSplitter.getRemoteCompatibility
(Connection manager) static void
NetworkFilters.injectIfNecessary
(Connection manager) protected boolean
ForgeConnectionNetworkFilter.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.minecraftforge.network.simple
Modifier and TypeMethodDescriptionboolean
SimpleChannel.isRemotePresent
(Connection manager) Returns true if the channel is present in the given connection.<MSG> void
SimpleChannel.sendTo
(MSG message, Connection manager, NetworkDirection direction) -
Uses of Connection in net.minecraftforge.server
Modifier and TypeMethodDescriptionstatic boolean
ServerLifecycleHooks.handleServerLogin
(ClientIntentionPacket packet, Connection manager) private static void
ServerLifecycleHooks.rejectConnection
(Connection manager, ConnectionType type, String message)