Interface PacketTypesProvider<CU extends ClientboundPacketType,CM extends ClientboundPacketType,SM extends ServerboundPacketType,SU extends ServerboundPacketType>
- Type Parameters:
CU
- unmapped clientbound packet typeCM
- mapped clientbound packet typeSM
- mapped serverbound packet typeSU
- 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 Summary
Modifier and TypeMethodDescriptionReturns a map of all mapped clientbound packet types that are expected to be used within the protocol.Returns a map of all mapped serverbound packet types that are expected to be used within the protocol.Returns a map of all unmapped clientbound packet types that are expected to be used within a protocol.default @Nullable CU
unmappedClientboundType
(State state, int packetId) default @Nullable CU
unmappedClientboundType
(State state, String typeName) Return a map of all unmapped serverbound packet types that are expected to be used within the protocol.default @Nullable SU
unmappedServerboundType
(State state, int packetId) default @Nullable SU
unmappedServerboundType
(State state, String typeName)
-
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 ifC1
encompasses more than justState.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 ifS2
encompasses more than justState.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
-
unmappedServerboundType
-
unmappedClientboundType
-
unmappedServerboundType
-