Botcraft 1.21.5
Loading...
Searching...
No Matches
AdvancementDisplay.hpp
Go to the documentation of this file.
1#pragma once
2
7
8namespace ProtocolCraft
9{
11 {
12 DEFINE_CONDITION(HasBackgroundTexture, GetFlags() & 0x01);
13
15 SERIALIZED_FIELD(Description, Chat);
18 SERIALIZED_FIELD(Flags, int);
20 SERIALIZED_FIELD(XCoord, float);
21 SERIALIZED_FIELD(YCoord, float);
22
24
25 GETTER(BackgroundTexture);
26 public:
27 auto& SetBackgroundTexture(const std::optional<Identifier>& BackgroundTexture_)
28 {
29 SetFlags(BackgroundTexture_.has_value() ? (GetFlags() | 0x01) : (GetFlags() & ~0x01));
30 BackgroundTexture = BackgroundTexture_;
31 return *this;
32 }
33 };
34}
auto & SetBackgroundTexture(const std::optional< Identifier > &BackgroundTexture_)
SERIALIZED_FIELD(FrameType, VarInt)
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(BackgroundTexture, Internal::Conditioned< Identifier, &AdvancementDisplay::HasBackgroundTexture >)
DEFINE_CONDITION(HasBackgroundTexture, GetFlags() &0x01)
SERIALIZED_FIELD(Description, Chat)
A type wrapper to conditionally serialize a type.
Definition Templates.hpp:83