Interface PacketType

All Known Subinterfaces:
ClientboundPacketType, ServerboundPacketType
All Known Implementing Classes:
SimpleProtocol.DummyPacketTypes

public sealed interface PacketType permits ClientboundPacketType, ServerboundPacketType
Interface representing PLAY state packets, ordered by their packet id.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Clientbound or serverbound direction.
    int
    Returns the packet id for the implemented protocol.
    Returns the name of the packet, to be consistent over multiple versions.
    default State
    Returns the protocol state the packet belongs to.
  • Method Details

    • getId

      int getId()
      Returns the packet id for the implemented protocol.
      Returns:
      packet id for the implemented protocol
    • getName

      String getName()
      Returns the name of the packet, to be consistent over multiple versions.
      Returns:
      name of the packet
    • direction

      Direction direction()
      Clientbound or serverbound direction.
      Returns:
      direction
    • state

      default State state()
      Returns the protocol state the packet belongs to.
      Returns:
      protocol state