Botcraft 1.21.4
Loading...
Searching...
No Matches
ServerboundMovePlayerPacketStatusOnly.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
2#pragma once
3
5
6namespace ProtocolCraft
7{
8 class ServerboundMovePlayerPacketStatusOnly : public BaseMessage<ServerboundMovePlayerPacketStatusOnly>
9 {
10 public:
11 static constexpr std::string_view packet_name = "Move Player Status Only";
12
13#if PROTOCOL_VERSION < 768 /* < 1.21.2 */
14 SERIALIZED_FIELD(OnGround, bool);
15#else
17
18 public:
19 bool GetOnGround() const { return Flags[0]; }
20 bool GetHorizontalCollision() const { return Flags[1]; }
21 THIS& SetOnGround(const bool b) { Flags.set(0, b); return *this; }
22 THIS& SetHorizontalCollision(const bool b) { Flags.set(1, b); return *this; }
23#endif
24
26 };
27} //ProtocolCraft
28#endif
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD_WITHOUT_GETTER_SETTER(Flags, std::bitset< 2 >)