Botcraft 1.21.4
Loading...
Searching...
No Matches
ClientboundSetObjectivePacket.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#if PROTOCOL_VERSION > 389 /* > 1.12.2 */
7#endif
8#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
10#endif
11
12namespace ProtocolCraft
13{
14 class ClientboundSetObjectivePacket : public BaseMessage<ClientboundSetObjectivePacket>
15 {
16 public:
17 static constexpr std::string_view packet_name = "Set Objective";
18
19 DEFINE_CONDITION(Method02, GetMethod() == 0 || GetMethod() == 2);
20
21 SERIALIZED_FIELD(ObjectiveName, std::string);
22 SERIALIZED_FIELD(Method, char);
23#if PROTOCOL_VERSION < 393 /* < 1.13 */
26#else
29#endif
30#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
32#endif
33
35 };
36} //ProtocolCraft
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(NumberFormat, Internal::Conditioned< ProtocolCraft::NumberFormat, &THIS::Method02 >)
SERIALIZED_FIELD(ObjectiveName, std::string)
SERIALIZED_FIELD(DisplayName, Internal::Conditioned< Chat, &THIS::Method02 >)
DEFINE_CONDITION(Method02, GetMethod()==0||GetMethod()==2)
SERIALIZED_FIELD(RenderType, Internal::Conditioned< VarInt, &THIS::Method02 >)
A type wrapper to conditionally serialize a type.
Definition Templates.hpp:83