Interface LoginPacketSerializer<T extends IntSupplier>

All Superinterfaces:
PacketSerializer<T>

public interface LoginPacketSerializer<T extends IntSupplier> extends PacketSerializer<T>
An interface that extends the logic in PacketSerializer to support login packets.
  • Method Details

    • getLoginIndex

      int getLoginIndex(T msg)
      Gets the login packet index from the packet.
    • setLoginIndex

      void setLoginIndex(T msg, int idx)
      Sets the login packet index to the packet.
    • buildLoginPackets

      default List<LoginPacketSerializer.LoginPacket<T>> buildLoginPackets(boolean isLocal)
      Builds a list of login packets that are sent on login. The default implementation calls a public no-arg constructor on the message class and returns a List with exactly one packet.
    • needsResponse

      default boolean needsResponse()
      Gets whether this login packet needs a response. The default implementation returns true.