Botcraft 1.21.4
Loading...
Searching...
No Matches
ServerboundInteractPacket.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace ProtocolCraft
6{
7 class ServerboundInteractPacket : public BaseMessage<ServerboundInteractPacket>
8 {
9 public:
10 static constexpr std::string_view packet_name = "Interact";
11
12 DEFINE_CONDITION(Action2, GetAction() == 2);
13 DEFINE_CONDITION(Action0_2, GetAction() == 0 || GetAction() == 2);
14
21#if PROTOCOL_VERSION > 722 /* > 1.15.2 */
22 SERIALIZED_FIELD(UsingSecondaryAction, bool);
23#endif
24
26 };
27} //ProtocolCraft
SERIALIZED_FIELD(LocationY, Internal::Conditioned< float, &THIS::Action2 >)
DEFINE_CONDITION(Action0_2, GetAction()==0||GetAction()==2)
SERIALIZED_FIELD(LocationX, Internal::Conditioned< float, &THIS::Action2 >)
DEFINE_CONDITION(Action2, GetAction()==2)
SERIALIZED_FIELD(UsingSecondaryAction, bool)
SERIALIZED_FIELD(LocationZ, Internal::Conditioned< float, &THIS::Action2 >)
SERIALIZED_FIELD(Hand, Internal::Conditioned< VarInt, &THIS::Action0_2 >)
A type wrapper to conditionally serialize a type.
Definition Templates.hpp:83