Botcraft 26.3
Loading...
Searching...
No Matches
ClientboundAddEntityPacket.hpp
Go to the documentation of this file.
1#pragma once
2
4#if PROTOCOL_VERSION > 772 /* > 1.21.8 */
6#endif
7
8namespace ProtocolCraft
9{
10 class ClientboundAddEntityPacket : public BasePacket<ClientboundAddEntityPacket>
11 {
12 public:
13 static constexpr std::string_view packet_name = "Add Entity";
14
15#if PROTOCOL_VERSION < 107 /* < 1.9 */
16 DEFINE_CONDITION(HasSpeed, GetData() > 0);
17#endif
18
20#if PROTOCOL_VERSION > 47 /* > 1.8.9 */
22#endif
23#if PROTOCOL_VERSION < 477 /* < 1.14 */
24 SERIALIZED_FIELD(Type, char);
25#else
27#endif
28#if PROTOCOL_VERSION < 107 /* < 1.9 */
29 SERIALIZED_FIELD(X, int);
30 SERIALIZED_FIELD(Y, int);
31 SERIALIZED_FIELD(Z, int);
32#else
33 SERIALIZED_FIELD(X, double);
34 SERIALIZED_FIELD(Y, double);
35 SERIALIZED_FIELD(Z, double);
36#endif
37#if PROTOCOL_VERSION > 772 /* > 1.21.8 */
39#endif
40 SERIALIZED_FIELD(XRot, unsigned char);
41 SERIALIZED_FIELD(YRot, unsigned char);
42#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
43 SERIALIZED_FIELD(YHeadRot, unsigned char);
44#endif
45#if PROTOCOL_VERSION < 759 /* < 1.19 */
46 SERIALIZED_FIELD(Data, int);
47#else
49#endif
50#if PROTOCOL_VERSION < 107 /* < 1.9 */
54#elif PROTOCOL_VERSION < 773 /* < 1.21.9 */
55 SERIALIZED_FIELD(Xa, short);
56 SERIALIZED_FIELD(Ya, short);
57 SERIALIZED_FIELD(Za, short);
58#endif
59
61 };
62} //ProtocolCraft
#define DEFINE_CONDITION(Name,...)
Define a condition that can be used later inside an Internal::Conditioned type.
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(YHeadRot, unsigned char)
std::array< unsigned char, 16 > UUID
A type wrapper to conditionally serialize a type.
Definition Templates.hpp:83