Type Parameters:
CU - unmapped clientbound packet type
CM - mapped clientbound packet type
SM - mapped serverbound packet type
SU - unmapped serverbound packet type
All Known Implementing Classes:
SimplePacketTypesProvider

public interface PacketTypesProvider<CU extends ClientboundPacketType,CM extends ClientboundPacketType,SM extends ServerboundPacketType,SU extends ServerboundPacketType>
Provides unmapped and mapped packet types for a Protocol.
See Also:
  • Method Details

    • unmappedClientboundPacketTypes

      Map<State,PacketTypeMap<CU>> unmappedClientboundPacketTypes()
      Returns a map of all unmapped clientbound packet types that are expected to be used within a protocol. This means that if C1 encompasses more than just State.PLAY packets, the other types are included as well.
      Returns:
      map of unmapped clientbound packet types
    • unmappedServerboundPacketTypes

      Map<State,PacketTypeMap<SU>> unmappedServerboundPacketTypes()
      Return a map of all unmapped serverbound packet types that are expected to be used within the protocol. This means that if S2 encompasses more than just State.PLAY packets, the other types have to be included as well.
      Returns:
      map of unmapped serverbound packet types
    • mappedClientboundPacketTypes

      Map<State,PacketTypeMap<CM>> mappedClientboundPacketTypes()
      Returns a map of all mapped clientbound packet types that are expected to be used within the protocol.
      Returns:
      map of mapped clientbound packet types
    • mappedServerboundPacketTypes

      Map<State,PacketTypeMap<SM>> mappedServerboundPacketTypes()
      Returns a map of all mapped serverbound packet types that are expected to be used within the protocol.
      Returns:
      map of mapped serverbound packet types
    • unmappedClientboundType

      default @Nullable CU unmappedClientboundType(State state, String typeName)
    • unmappedServerboundType

      default @Nullable SU unmappedServerboundType(State state, String typeName)
    • unmappedClientboundType

      default @Nullable CU unmappedClientboundType(State state, int packetId)
    • unmappedServerboundType

      default @Nullable SU unmappedServerboundType(State state, int packetId)