Botcraft 1.21.4
Loading...
Searching...
No Matches
ProtocolCraft::ServerboundInteractPacket Class Reference

#include <ServerboundInteractPacket.hpp>

Inheritance diagram for ProtocolCraft::ServerboundInteractPacket:
ProtocolCraft::BaseMessage< ServerboundInteractPacket > ProtocolCraft::Message ProtocolCraft::NetworkType

Public Member Functions

 DEFINE_CONDITION (Action2, GetAction()==2)
 
 DEFINE_CONDITION (Action0_2, GetAction()==0||GetAction()==2)
 
 SERIALIZED_FIELD (EntityId, VarInt)
 
 SERIALIZED_FIELD (Action, VarInt)
 
 SERIALIZED_FIELD (LocationX, Internal::Conditioned< float, &THIS::Action2 >)
 
 SERIALIZED_FIELD (LocationY, Internal::Conditioned< float, &THIS::Action2 >)
 
 SERIALIZED_FIELD (LocationZ, Internal::Conditioned< float, &THIS::Action2 >)
 
 SERIALIZED_FIELD (Hand, Internal::Conditioned< VarInt, &THIS::Action0_2 >)
 
 SERIALIZED_FIELD (UsingSecondaryAction, bool)
 
- Public Member Functions inherited from ProtocolCraft::BaseMessage< ServerboundInteractPacket >
virtual ~BaseMessage () override
 
virtual int GetId () const override
 
virtual std::string_view GetName () const override
 
- Public Member Functions inherited from ProtocolCraft::Message
virtual ~Message ()
 
virtual void Write (WriteContainer &container) const override
 
void Dispatch (Handler *handler)
 
- Public Member Functions inherited from ProtocolCraft::NetworkType
virtual ~NetworkType ()
 
virtual void Read (ReadIterator &iter, size_t &length)
 
virtual Json::Value Serialize () const
 

Public Attributes

 DECLARE_READ_WRITE_SERIALIZE
 

Static Public Attributes

static constexpr std::string_view packet_name = "Interact"
 

Additional Inherited Members

- Protected Types inherited from ProtocolCraft::BaseMessage< ServerboundInteractPacket >
using THIS = ServerboundInteractPacket
 
- Protected Member Functions inherited from ProtocolCraft::BaseMessage< ServerboundInteractPacket >
virtual void DispatchImpl (Handler *handler) override
 
- Protected Member Functions inherited from ProtocolCraft::NetworkType
virtual void ReadImpl (ReadIterator &iter, size_t &length)=0
 
virtual void WriteImpl (WriteContainer &container) const =0
 
virtual Json::Value SerializeImpl () const =0
 

Detailed Description

Definition at line 7 of file ServerboundInteractPacket.hpp.

Member Function Documentation

◆ DEFINE_CONDITION() [1/2]

ProtocolCraft::ServerboundInteractPacket::DEFINE_CONDITION ( Action0_2  ,
GetAction()  = =0||GetAction()==2 
)

◆ DEFINE_CONDITION() [2/2]

ProtocolCraft::ServerboundInteractPacket::DEFINE_CONDITION ( Action2  ,
GetAction()  = =2 
)

◆ SERIALIZED_FIELD() [1/7]

ProtocolCraft::ServerboundInteractPacket::SERIALIZED_FIELD ( Action  ,
VarInt   
)

◆ SERIALIZED_FIELD() [2/7]

ProtocolCraft::ServerboundInteractPacket::SERIALIZED_FIELD ( EntityId  ,
VarInt   
)

◆ SERIALIZED_FIELD() [3/7]

ProtocolCraft::ServerboundInteractPacket::SERIALIZED_FIELD ( Hand  ,
Internal::Conditioned< VarInt, &THIS::Action0_2 >   
)

◆ SERIALIZED_FIELD() [4/7]

ProtocolCraft::ServerboundInteractPacket::SERIALIZED_FIELD ( LocationX  ,
Internal::Conditioned< float, &THIS::Action2 >   
)

◆ SERIALIZED_FIELD() [5/7]

ProtocolCraft::ServerboundInteractPacket::SERIALIZED_FIELD ( LocationY  ,
Internal::Conditioned< float, &THIS::Action2 >   
)

◆ SERIALIZED_FIELD() [6/7]

ProtocolCraft::ServerboundInteractPacket::SERIALIZED_FIELD ( LocationZ  ,
Internal::Conditioned< float, &THIS::Action2 >   
)

◆ SERIALIZED_FIELD() [7/7]

ProtocolCraft::ServerboundInteractPacket::SERIALIZED_FIELD ( UsingSecondaryAction  ,
bool   
)

Member Data Documentation

◆ DECLARE_READ_WRITE_SERIALIZE

ProtocolCraft::ServerboundInteractPacket::DECLARE_READ_WRITE_SERIALIZE

Definition at line 25 of file ServerboundInteractPacket.hpp.

◆ packet_name

constexpr std::string_view ProtocolCraft::ServerboundInteractPacket::packet_name = "Interact"
staticconstexpr

Definition at line 10 of file ServerboundInteractPacket.hpp.


The documentation for this class was generated from the following file: