1#if PROTOCOL_VERSION < 755
8 enum class SetBorderType
18 class ClientboundSetBorderPacket :
public BaseMessage<ClientboundSetBorderPacket>
21 static constexpr std::string_view packet_name =
"Set Border";
23 DEFINE_CONDITION(SetLerpInit, GetAction() == SetBorderType::SetSize || GetAction() == SetBorderType::LerpSize || GetAction() == SetBorderType::Initialize);
24 DEFINE_CONDITION(LerpInit, GetAction() == SetBorderType::LerpSize || GetAction() == SetBorderType::Initialize);
25 DEFINE_CONDITION(CenterInit, GetAction() == SetBorderType::SetCenter || GetAction() == SetBorderType::Initialize);
27 DEFINE_CONDITION(InitWarnTime, GetAction() == SetBorderType::Initialize || GetAction() == SetBorderType::SetWarningTime);
28 DEFINE_CONDITION(InitWarnBlock, GetAction() == SetBorderType::Initialize || GetAction() == SetBorderType::SetWarningBlocks);
31 SERIALIZED_FIELD(NewCenterX, Internal::Conditioned<double, &THIS::CenterInit>);
32 SERIALIZED_FIELD(NewCenterZ, Internal::Conditioned<double, &THIS::CenterInit>);
34 SERIALIZED_FIELD(NewSize, Internal::Conditioned<double, &THIS::SetLerpInit>);
36 SERIALIZED_FIELD(NewAbsoluteMaxSize, Internal::Conditioned<VarInt, &THIS::Init>);
37 SERIALIZED_FIELD(WarningTime, Internal::Conditioned<VarInt, &THIS::InitWarnTime>);
38 SERIALIZED_FIELD(WarningBlocks, Internal::Conditioned<VarInt, &THIS::InitWarnBlock>);
#define DEFINE_CONDITION(Name,...)
Define a condition that can be used later inside an Internal::Conditioned type.
#define DECLARE_READ_WRITE_SERIALIZE
Define auto serializable utilities and declare ReadImpl, WriteImpl and SerializeImpl virtual function...
#define SERIALIZED_FIELD(Name,...)