Botcraft 1.21.4
Loading...
Searching...
No Matches
FilterMask.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 759 /* > 1.19 */
2#pragma once
3
5
6namespace ProtocolCraft
7{
8 class FilterMask : public NetworkType
9 {
10 DEFINE_CONDITION(IsType2, GetType() == 2);
11
13 SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Mask, Internal::Conditioned<std::vector<long long int>, &FilterMask::IsType2>);
14
16
17 GETTER(Mask);
18
19 public:
20 auto& SetMask(const std::optional<std::vector<long long int>>& Mask_)
21 {
22 if (Mask_.has_value())
23 {
24 SetType(2);
25 }
26 Mask = Mask_;
27 return *this;
28 }
29 };
30}
31#endif
auto & SetMask(const std::optional< std::vector< long long int > > &Mask_)
SERIALIZED_FIELD(Type, VarInt)
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Mask, Internal::Conditioned< std::vector< long long int >, &FilterMask::IsType2 >)
DEFINE_CONDITION(IsType2, GetType()==2)
A type wrapper to conditionally serialize a type.
Definition Templates.hpp:83