Package net.fabricmc.fabric.api.client.networking.v1
package net.fabricmc.fabric.api.client.networking.v1
The Networking API (client side), version 1.
There are three stages of Minecraft networking, all of which are supported in this API:
- LOGIN
- This is the initial stage, before the player logs into the world. If using a proxy server,
the packets in this stage may be intercepted and discarded by the proxy. Most of the pre-1.20.2
uses of this event should be replaced with the CONFIGURATION stage.
Related events are found at
ClientLoginConnectionEvents
, and related methods are found atClientLoginNetworking
. - CONFIGURATION
- This is the stage after LOGIN. The player is authenticated, but still hasn't joined the
world at this point. Clients can use this phase to send configurations or verify their mod
versions. Note that some server mods allow players in the PLAY stage to re-enter this stage,
for example when a player chooses a minigame server in a lobby.
Related events are found at
C2SConfigurationChannelEvents
andClientConfigurationConnectionEvents
, and related methods are found atClientConfigurationNetworking
. - PLAY
- This is the stage after CONFIGURATION, where gameplay-related packets are sent and received.
The player has joined the world and is playing the game. Related events are found at
C2SPlayChannelEvents
andClientPlayConnectionEvents
, and related methods are found atClientPlayNetworking
.
-
ClassDescriptionOffers access to events related to the indication of a connected server's ability to receive packets in certain channels.Offers access to events related to the indication of a connected server's ability to receive packets in certain channels.Offers access to events related to the configuration connection to a server on a logical client.Offers access to configuration stage client-side networking functionalities.A thread-safe packet handler utilizing
FabricPacket
.Offers access to events related to the connection to a server on the client while the server is processing the client's login request.Offers access to login stage client-side networking functionalities.Offers access to events related to the connection to a server on a logical client.Offers access to play stage client-side networking functionalities.A thread-safe packet handler utilizingFabricPacket
.