Botcraft 26.3
Loading...
Searching...
No Matches
ProtocolCraft::ClientboundMoveEntityPacketPos Class Reference

#include <ClientboundMoveEntityPacketPos.hpp>

Inheritance diagram for ProtocolCraft::ClientboundMoveEntityPacketPos:
ProtocolCraft::BasePacket< ClientboundMoveEntityPacketPos > ProtocolCraft::Packet ProtocolCraft::NetworkType

Public Member Functions

 DEFINE_CONDITION (IsSingleStep, GetStepCount()<=0)
 
bool GetOnGround () const
 
THIS & SetOnGround (const bool b)
 
int GetStepCount () const
 
THIS & SetStepCount (const int i)
 
- Public Member Functions inherited from ProtocolCraft::BasePacket< ClientboundMoveEntityPacketPos >
virtual ~BasePacket () override
 
virtual int GetId () const override
 
virtual std::string_view GetName () const override
 
- Public Member Functions inherited from ProtocolCraft::Packet
virtual ~Packet ()
 
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 = "Move Entity Pos"
 

Private Member Functions

std::optional< std::vector< std::pair< int, std::array< short, 3 > > > > ReadStepped (ReadIterator &iter, size_t &length) const
 
void WriteStepped (const std::optional< std::vector< std::pair< int, std::array< short, 3 > > > > &stepped_deltas_, WriteContainer &c) const
 
 SERIALIZED_FIELD (EntityId, VarInt)
 
 SERIALIZED_FIELD_WITHOUT_GETTER_SETTER (Properties, VarInt)
 
 SERIALIZED_FIELD (SingleDelta, Internal::Conditioned< std::array< short, 3 >, &THIS::IsSingleStep >)
 
 SERIALIZED_FIELD (SteppedDeltas, Internal::CustomType< std::optional< std::vector< std::pair< int, std::array< short, 3 > > > >, &THIS::ReadStepped, &THIS::WriteStepped, nullptr >)
 

Additional Inherited Members

- Protected Types inherited from ProtocolCraft::BasePacket< ClientboundMoveEntityPacketPos >
using THIS = ClientboundMoveEntityPacketPos
 
- Protected Member Functions inherited from ProtocolCraft::BasePacket< ClientboundMoveEntityPacketPos >
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 14 of file ClientboundMoveEntityPacketPos.hpp.

Member Function Documentation

◆ DEFINE_CONDITION()

ProtocolCraft::ClientboundMoveEntityPacketPos::DEFINE_CONDITION ( IsSingleStep  ,
GetStepCount()<=  0 
)

◆ GetOnGround()

bool ProtocolCraft::ClientboundMoveEntityPacketPos::GetOnGround ( ) const
inline

Definition at line 72 of file ClientboundMoveEntityPacketPos.hpp.

Referenced by Botcraft::EntityManager::Handle().

◆ GetStepCount()

int ProtocolCraft::ClientboundMoveEntityPacketPos::GetStepCount ( ) const
inline

Definition at line 83 of file ClientboundMoveEntityPacketPos.hpp.

Referenced by ReadStepped().

◆ ReadStepped()

std::optional< std::vector< std::pair< int, std::array< short, 3 > > > > ProtocolCraft::ClientboundMoveEntityPacketPos::ReadStepped ( ReadIterator &  iter,
size_t &  length 
) const
inlineprivate

Definition at line 23 of file ClientboundMoveEntityPacketPos.hpp.

References GetStepCount().

◆ SERIALIZED_FIELD() [1/3]

ProtocolCraft::ClientboundMoveEntityPacketPos::SERIALIZED_FIELD ( EntityId  ,
VarInt   
)
private

◆ SERIALIZED_FIELD() [2/3]

ProtocolCraft::ClientboundMoveEntityPacketPos::SERIALIZED_FIELD ( SingleDelta  ,
Internal::Conditioned< std::array< short, 3 >, &THIS::IsSingleStep >   
)
private

◆ SERIALIZED_FIELD() [3/3]

ProtocolCraft::ClientboundMoveEntityPacketPos::SERIALIZED_FIELD ( SteppedDeltas  ,
Internal::CustomType< std::optional< std::vector< std::pair< int, std::array< short, 3 > > > >, &THIS::ReadStepped, &THIS::WriteStepped, nullptr >   
)
private

◆ SERIALIZED_FIELD_WITHOUT_GETTER_SETTER()

ProtocolCraft::ClientboundMoveEntityPacketPos::SERIALIZED_FIELD_WITHOUT_GETTER_SETTER ( Properties  ,
VarInt   
)
private

◆ SetOnGround()

THIS & ProtocolCraft::ClientboundMoveEntityPacketPos::SetOnGround ( const bool  b)
inline

Definition at line 77 of file ClientboundMoveEntityPacketPos.hpp.

◆ SetStepCount()

THIS & ProtocolCraft::ClientboundMoveEntityPacketPos::SetStepCount ( const int  i)
inline

Definition at line 88 of file ClientboundMoveEntityPacketPos.hpp.

◆ WriteStepped()

void ProtocolCraft::ClientboundMoveEntityPacketPos::WriteStepped ( const std::optional< std::vector< std::pair< int, std::array< short, 3 > > > > &  stepped_deltas_,
WriteContainer &  c 
) const
inlineprivate

Definition at line 39 of file ClientboundMoveEntityPacketPos.hpp.

Member Data Documentation

◆ DECLARE_READ_WRITE_SERIALIZE

ProtocolCraft::ClientboundMoveEntityPacketPos::DECLARE_READ_WRITE_SERIALIZE

Definition at line 95 of file ClientboundMoveEntityPacketPos.hpp.

◆ packet_name

constexpr std::string_view ProtocolCraft::ClientboundMoveEntityPacketPos::packet_name = "Move Entity Pos"
staticconstexpr

Definition at line 17 of file ClientboundMoveEntityPacketPos.hpp.


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