Botcraft 26.3
Loading...
Searching...
No Matches
ClientboundAddMobPacket.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 ClientboundAddMobPacket : public BasePacket<ClientboundAddMobPacket>
9 {
10 public:
11 static constexpr std::string_view packet_name = "Add Mob";
12
13 SERIALIZED_FIELD(EntityId, VarInt);
14#if PROTOCOL_VERSION > 47 /* > 1.8.9 */
15 SERIALIZED_FIELD(Uuid, UUID);
16#endif
17#if PROTOCOL_VERSION < 315 /* < 1.11 */
18 SERIALIZED_FIELD(Type, unsigned char);
19#else
20 SERIALIZED_FIELD(Type, VarInt);
21#endif
22#if PROTOCOL_VERSION < 107 /* < 1.9 */
23 SERIALIZED_FIELD(X, int);
24 SERIALIZED_FIELD(Y, int);
25 SERIALIZED_FIELD(Z, int);
26#else
27 SERIALIZED_FIELD(X, double);
28 SERIALIZED_FIELD(Y, double);
29 SERIALIZED_FIELD(Z, double);
30#endif
31 SERIALIZED_FIELD(YRot, unsigned char);
32 SERIALIZED_FIELD(XRot, unsigned char);
33 SERIALIZED_FIELD(YHeadRot, unsigned char);
34 SERIALIZED_FIELD(Xd, short);
35 SERIALIZED_FIELD(Yd, short);
36 SERIALIZED_FIELD(Zd, short);
37#if PROTOCOL_VERSION < 573 /* < 1.15 */
38 SERIALIZED_FIELD(RawMetadata, Internal::Vector<unsigned char, void, 0>);
39#endif
40
42 };
43} //ProtocolCraft
44#endif
#define DECLARE_READ_WRITE_SERIALIZE
Define auto serializable utilities and declare ReadImpl, WriteImpl and SerializeImpl virtual function...
#define SERIALIZED_FIELD(Name,...)