5#if PROTOCOL_VERSION > 776
18 static constexpr std::string_view
packet_name =
"Move Entity PosRot";
20#if PROTOCOL_VERSION > 776
29 std::vector<std::pair<int, std::array<short, 3>>> deltas(step_count);
30 for (
int i = 0; i < step_count; ++i)
32 deltas[i].first = ReadData<VarInt>(iter, length);
33 deltas[i].second = ReadData<std::array<short, 3>>(iter, length);
42 if (stepped_deltas_.has_value())
44 const std::vector<std::pair<int, std::array<short, 3>>>& v = stepped_deltas_.value();
45 for (
size_t i = 0; i < v.size(); ++i)
47 WriteData<VarInt>(v[i].first, c);
48 WriteData<std::array<short, 3>>(v[i].second, c);
55#if PROTOCOL_VERSION < 107
62#elif PROTOCOL_VERSION < 777
78#if PROTOCOL_VERSION > 776
82 return static_cast<bool>(Properties & 1);
87 Properties = (Properties & ~1) |
static_cast<int>(b);
93 return Properties >> 1;
98 Properties = (Properties & 1) | (i << 1);
#define SERIALIZED_FIELD(Name,...)
std::optional< std::vector< std::pair< int, std::array< short, 3 > > > > ReadStepped(ReadIterator &iter, size_t &length) const
static constexpr std::string_view packet_name
SERIALIZED_FIELD(XRot, unsigned char)
THIS & SetOnGround(const bool b)
THIS & SetStepCount(const int i)
SERIALIZED_FIELD(SteppedDeltas, Internal::CustomType< std::optional< std::vector< std::pair< int, std::array< short, 3 > > > >, &THIS::ReadStepped, &THIS::WriteStepped, nullptr >)
SERIALIZED_FIELD(SingleDelta, Internal::Conditioned< std::array< short, 3 >, &THIS::IsSingleStep >)
SERIALIZED_FIELD(YRot, unsigned char)
DEFINE_CONDITION(IsSingleStep, GetStepCount()<=0)
void WriteStepped(const std::optional< std::vector< std::pair< int, std::array< short, 3 > > > > &stepped_deltas_, WriteContainer &c) const
DECLARE_READ_WRITE_SERIALIZE
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Properties, VarInt)
SERIALIZED_FIELD(EntityId, VarInt)
std::vector< unsigned char > WriteContainer
std::vector< unsigned char >::const_iterator ReadIterator
A type wrapper to conditionally serialize a type.