Botcraft 26.3
Loading...
Searching...
No Matches
ClientboundAddPlayerPacket.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION < 764 /* < 1.20.2 */
2#pragma once
3
5
6namespace ProtocolCraft
7{
8 class ClientboundAddPlayerPacket : public BasePacket<ClientboundAddPlayerPacket>
9 {
10 public:
11 static constexpr std::string_view packet_name = "Add Player";
12
13 SERIALIZED_FIELD(EntityId, VarInt);
14 SERIALIZED_FIELD(PlayerId, UUID);
15#if PROTOCOL_VERSION < 107 /* < 1.9 */
16 SERIALIZED_FIELD(X, int);
17 SERIALIZED_FIELD(Y, int);
18 SERIALIZED_FIELD(Z, int);
19#else
20 SERIALIZED_FIELD(X, double);
21 SERIALIZED_FIELD(Y, double);
22 SERIALIZED_FIELD(Z, double);
23#endif
24 SERIALIZED_FIELD(YRot, unsigned char);
25 SERIALIZED_FIELD(XRot, unsigned char);
26#if PROTOCOL_VERSION < 107 /* < 1.9 */
27 SERIALIZED_FIELD(CurrentItem, short);
28#endif
29#if PROTOCOL_VERSION < 573 /* < 1.15 */
30 SERIALIZED_FIELD(RawMetadata, Internal::Vector<unsigned char, void, 0>);
31#endif
32
34 };
35} //ProtocolCraft
36#endif
#define DECLARE_READ_WRITE_SERIALIZE
Define auto serializable utilities and declare ReadImpl, WriteImpl and SerializeImpl virtual function...
#define SERIALIZED_FIELD(Name,...)