Botcraft 26.1.2
Loading...
Searching...
No Matches
ServerboundInteractPacket.hpp
Go to the documentation of this file.
1#pragma once
2
4#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
6#endif
7
8namespace ProtocolCraft
9{
10 class ServerboundInteractPacket : public BasePacket<ServerboundInteractPacket>
11 {
12 public:
13 static constexpr std::string_view packet_name = "Interact";
14
15#if PROTOCOL_VERSION < 775 /* < 26.1 */
16 DEFINE_CONDITION(Action2, GetAction() == 2);
17 DEFINE_CONDITION(Action0_2, GetAction() == 0 || GetAction() == 2);
18#endif
19
21#if PROTOCOL_VERSION < 775 /* < 26.1 */
22 SERIALIZED_FIELD(Action, VarInt);
27#else
30#endif
31#if PROTOCOL_VERSION > 722 /* > 1.15.2 */
32 SERIALIZED_FIELD(UsingSecondaryAction, bool);
33#endif
34
36 };
37} //ProtocolCraft
#define DEFINE_CONDITION(Name,...)
Define a condition that can be used later inside an Internal::Conditioned type.
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(UsingSecondaryAction, bool)
A type wrapper to conditionally serialize a type.
Definition Templates.hpp:83