Botcraft 26.3
Loading...
Searching...
No Matches
ServerboundUseItemOnPacket.hpp
Go to the documentation of this file.
1#pragma once
2
5#if PROTOCOL_VERSION < 107 /* < 1.9 */
7#endif
8
9namespace ProtocolCraft
10{
11 class ServerboundUseItemOnPacket : public BasePacket<ServerboundUseItemOnPacket>
12 {
13 public:
14 static constexpr std::string_view packet_name = "Use Item On";
15
16#if PROTOCOL_VERSION > 452 /* > 1.13.2 */
18#endif
20#if PROTOCOL_VERSION < 107 /* < 1.9 */
21 SERIALIZED_FIELD(Direction, unsigned char);
23#else
25#endif
26#if PROTOCOL_VERSION > 47 /* > 1.8.9 */ && PROTOCOL_VERSION < 477 /* < 1.14 */
28#endif
29#if PROTOCOL_VERSION < 315 /* < 1.11 */
30 SERIALIZED_FIELD(CursorPositionX, unsigned char);
31 SERIALIZED_FIELD(CursorPositionY, unsigned char);
32 SERIALIZED_FIELD(CursorPositionZ, unsigned char);
33#else
34 SERIALIZED_FIELD(CursorPositionX, float);
35 SERIALIZED_FIELD(CursorPositionY, float);
36 SERIALIZED_FIELD(CursorPositionZ, float);
37#endif
38#if PROTOCOL_VERSION > 452 /* > 1.13.2 */
39 SERIALIZED_FIELD(Inside, bool);
40#endif
41#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
42 SERIALIZED_FIELD(WorldBorderHit, bool);
43#endif
44#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
46#endif
47
49 };
50} //ProtocolCraft
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(Location, NetworkPosition)
SERIALIZED_FIELD(CursorPositionZ, float)
SERIALIZED_FIELD(CursorPositionX, float)
SERIALIZED_FIELD(CursorPositionY, float)