Botcraft 26.3
Loading...
Searching...
No Matches
DebugSubscription.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 772 /* > 1.21.8 */
2#pragma once
3
6
7#include <memory>
8#include <optional>
9
10namespace ProtocolCraft
11{
33
34 class DebugSubscriptionData;
35
37 {
38 private:
39 static std::shared_ptr<DebugSubscriptionData> CreateDebugSubscriptionData(const DebugSubscriptionDataType type);
40
42 SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Data, std::optional<std::shared_ptr<DebugSubscriptionData>>);
43
44 GETTER(Type);
45 GETTER(Data);
46
48 // Special case to set the type and set the data to empty std::optional
50
52 };
53
63}
64#endif
SERIALIZED_DYNAMIC_FIELD(DebugSubscriptionEvent, Type, Data, DebugSubscriptionData, DebugSubscriptionEvent::CreateDebugSubscriptionData, Internal::DiffType< DebugSubscriptionDataType, VarInt >)
static std::shared_ptr< DebugSubscriptionData > CreateDebugSubscriptionData(const DebugSubscriptionDataType type)
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Type, Internal::DiffType< DebugSubscriptionDataType, VarInt >)
DYNAMIC_TYPE_SETTER(Type, Data, DebugSubscriptionUpdate::CreateDebugSubscriptionData)
static std::shared_ptr< DebugSubscriptionData > CreateDebugSubscriptionData(const DebugSubscriptionDataType type)
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Data, std::optional< std::shared_ptr< DebugSubscriptionData > >)
DebugSubscriptionUpdate & SetDataTypeNoData(const DebugSubscriptionDataType type)
Just a simple type wrapper that will store with T1 and serialize as T2 (can be used for Enum/VarInt f...
Definition Templates.hpp:72