10 template<
typename TypesTuple>
11 std::shared_ptr<Packet> AutomaticPacketFactory(
const int id)
13 std::shared_ptr<Packet> output =
nullptr;
15 Internal::loop<std::tuple_size_v<TypesTuple>>([&](
auto i) {
18 output = std::make_shared<std::tuple_element_t<i, TypesTuple>>();
31 return AutomaticPacketFactory<AllClientboundLoginPackets>(
id);
33 return AutomaticPacketFactory<AllClientboundStatusPackets>(
id);
35 return AutomaticPacketFactory<AllClientboundPlayPackets>(
id);
36#if PROTOCOL_VERSION > 763
38 return AutomaticPacketFactory<AllClientboundConfigurationPackets>(
id);
50 return AutomaticPacketFactory<AllServerboundHandshakingPackets>(
id);
52 return AutomaticPacketFactory<AllServerboundLoginPackets>(
id);
54 return AutomaticPacketFactory<AllServerboundStatusPackets>(
id);
56 return AutomaticPacketFactory<AllServerboundPlayPackets>(
id);
57#if PROTOCOL_VERSION > 763
59 return AutomaticPacketFactory<AllServerboundConfigurationPackets>(
id);
std::shared_ptr< Packet > CreateClientboundPacket(const ConnectionState state, const int id)
std::shared_ptr< Packet > CreateServerboundPacket(const ConnectionState state, const int id)