Interface ClientSidePacketRegistry

All Superinterfaces:
PacketRegistry

@Deprecated public interface ClientSidePacketRegistry extends PacketRegistry
Deprecated.
Please migrate to ClientPlayNetworking.
The client-side packet registry.

It is used for:

  • registering client-side packet receivers (server -> client packets)
  • sending packets to the server (client -> server packets).
  • Field Details

  • Method Details

    • canServerReceive

      boolean canServerReceive(Identifier id)
      Deprecated.
      Check if the server declared the ability to receive a given packet ID using the vanilla "register/unregister" protocol.
      Parameters:
      id - The packet identifier.
      Returns:
      True if the server side declared a given packet identifier.
    • sendToServer

      void sendToServer(Packet<?> packet, GenericFutureListener<? extends Future<? super Void>> completionListener)
      Deprecated.
      Send a packet to the server.
      Parameters:
      packet - The packet to be sent.
      completionListener - Completion listener. Can be used to check for the success or failure of sending a given packet, among others.
    • sendToServer

      default void sendToServer(Identifier id, PacketByteBuf buf, GenericFutureListener<? extends Future<? super Void>> completionListener)
      Deprecated.
      Send an identifier/buffer-based packet to the server.
      Parameters:
      id - The packet identifier.
      buf - The packet byte buffer.
      completionListener - Completion listener. Can be used to check for the success or failure of sending a given packet, among others.
    • sendToServer

      default void sendToServer(Packet<?> packet)
      Deprecated.
      Send a packet to the server.
      Parameters:
      packet - The packet to be sent.
    • sendToServer

      default void sendToServer(Identifier id, PacketByteBuf buf)
      Deprecated.
      Send an identifier/buffer-based packet to the server.
      Parameters:
      id - The packet identifier.
      buf - The packet byte buffer.