Botcraft 1.21.4
Loading...
Searching...
No Matches
ServerboundContainerClickPacket.hpp
Go to the documentation of this file.
1#pragma once
2
5#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
6#include <map>
7#endif
8
9namespace ProtocolCraft
10{
11 class ServerboundContainerClickPacket : public BaseMessage<ServerboundContainerClickPacket>
12 {
13 public:
14 static constexpr std::string_view packet_name = "Container Click";
15
16#if PROTOCOL_VERSION < 768 /* < 1.21.2 */
17 SERIALIZED_FIELD(ContainerId, unsigned char);
18#else
19 SERIALIZED_FIELD(ContainerId, VarInt);
20#endif
21#if PROTOCOL_VERSION > 755 /* > 1.17 */
23#endif
24 SERIALIZED_FIELD(SlotNum, short);
25 SERIALIZED_FIELD(ButtonNum, char);
26#if PROTOCOL_VERSION < 755 /* < 1.17 */
27 SERIALIZED_FIELD(Uid, short);
28#endif
30#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
31 SERIALIZED_FIELD(ChangedSlots, std::map<short, Slot>);
32#endif
33 SERIALIZED_FIELD(CarriedItem, Slot);
34
36 };
37} //ProtocolCraft
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(ChangedSlots, std::map< short, Slot >)