Botcraft 1.21.11
Loading...
Searching...
No Matches
AvatarEntity.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 772 /* > 1.21.8 */
2#pragma once
3
5
6namespace Botcraft
7{
9 {
10 protected:
11 static constexpr int metadata_count = 2;
12 static const std::array<std::string, metadata_count> metadata_names;
14
15 public:
17 virtual ~AvatarEntity();
18
19 virtual bool IsAvatar() const override;
20
21 virtual ProtocolCraft::Json::Value Serialize() const override;
22
23 // Metadata stuff
24 virtual void SetMetadataValue(const int index, const std::any& value) override;
25
26#if PROTOCOL_VERSION < 774 /* < 1.21.11 */
27 char GetDataPlayerMainHand() const;
28#else
29 int GetDataPlayerMainHand() const;
30#endif
32
33#if PROTOCOL_VERSION < 774 /* < 1.21.11 */
34 void SetDataPlayerMainHand(const char data_player_main_hand);
35#else
36 void SetDataPlayerMainHand(const int data_player_main_hand);
37#endif
38 void SetDataPlayerModeCustomisation(const char data_player_mode_customisation);
39
40 };
41}
42#endif
static constexpr int metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
char GetDataPlayerModeCustomisation() const
static const std::array< std::string, metadata_count > metadata_names
static constexpr int hierarchy_metadata_count
void SetDataPlayerModeCustomisation(const char data_player_mode_customisation)
virtual void SetMetadataValue(const int index, const std::any &value) override
int GetDataPlayerMainHand() const
virtual bool IsAvatar() const override
void SetDataPlayerMainHand(const int data_player_main_hand)
static constexpr int hierarchy_metadata_count
static constexpr int metadata_count
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45