Class ClientPlayNetworking

java.lang.Object
net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking

public final class ClientPlayNetworking extends Object
Offers access to play stage client-side networking functionalities.

Client-side networking functionalities include receiving clientbound packets, sending serverbound packets, and events related to client-side network handlers. Packets received by this class must be registered to PayloadTypeRegistry.playS2C() on both ends. Packets sent by this class must be registered to PayloadTypeRegistry.playC2S() on both ends. Packets must be registered before registering any receivers.

This class should be only used on the physical client and for the logical client.

See ServerPlayNetworking for information on how to use the payload object-based API.

See Also: