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 Summary

    Fields
    Modifier and Type
    Field
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canServerReceive(net.minecraft.util.Identifier id)
    Deprecated.
    Check if the server declared the ability to receive a given packet ID using the vanilla "register/unregister" protocol.
    default void
    sendToServer(net.minecraft.network.Packet<?> packet)
    Deprecated.
    Send a packet to the server.
    void
    sendToServer(net.minecraft.network.Packet<?> packet, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> completionListener)
    Deprecated.
    Send a packet to the server.
    default void
    sendToServer(net.minecraft.util.Identifier id, net.minecraft.network.PacketByteBuf buf)
    Deprecated.
    Send an identifier/buffer-based packet to the server.
    default void
    sendToServer(net.minecraft.util.Identifier id, net.minecraft.network.PacketByteBuf buf, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> completionListener)
    Deprecated.
    Send an identifier/buffer-based packet to the server.

    Methods inherited from interface net.fabricmc.fabric.api.network.PacketRegistry

    register, toPacket, unregister
  • Field Details

  • Method Details

    • canServerReceive

      boolean canServerReceive(net.minecraft.util.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(net.minecraft.network.Packet<?> packet, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.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(net.minecraft.util.Identifier id, net.minecraft.network.PacketByteBuf buf, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.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(net.minecraft.network.Packet<?> packet)
      Deprecated.
      Send a packet to the server.
      Parameters:
      packet - The packet to be sent.
    • sendToServer

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