23 return Internal::get_tuple_index<TDerived, AllClientboundStatusPackets>;
25 else if constexpr (Internal::tuple_contains_type<TDerived, AllServerboundStatusPackets>)
27 return Internal::get_tuple_index<TDerived, AllServerboundStatusPackets>;
29 else if constexpr (Internal::tuple_contains_type<TDerived, AllClientboundLoginPackets>)
31 return Internal::get_tuple_index<TDerived, AllClientboundLoginPackets>;
33 else if constexpr (Internal::tuple_contains_type<TDerived, AllServerboundLoginPackets>)
35 return Internal::get_tuple_index<TDerived, AllServerboundLoginPackets>;
37 else if constexpr (Internal::tuple_contains_type<TDerived, AllServerboundHandshakingPackets>)
39 return Internal::get_tuple_index<TDerived, AllServerboundHandshakingPackets>;
41#if PROTOCOL_VERSION > 763
42 else if constexpr (Internal::tuple_contains_type<TDerived, AllServerboundConfigurationPackets>)
44 return Internal::get_tuple_index<TDerived, AllServerboundConfigurationPackets>;
46 else if constexpr (Internal::tuple_contains_type<TDerived, AllClientboundConfigurationPackets>)
48 return Internal::get_tuple_index<TDerived, AllClientboundConfigurationPackets>;
53 static_assert(Internal::dependant_false<TDerived>,
"Trying to define a packet which is not in protocol tuples");
57 template <
typename TDerived>
60 handler->Handle(
static_cast<TDerived&
>(*
this));