Botcraft 26.3
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 private:
11 static constexpr std::array metadata_names{
12 std::string_view("data_player_main_hand"),
13 std::string_view("data_player_mode_customisation"),
14 };
15 protected:
16 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
18
19 public:
21 virtual ~AvatarEntity();
22
23 virtual bool IsAvatar() const override;
24
25 virtual ProtocolCraft::Json::Value Serialize() const override;
26
27 // Metadata stuff
28#if PROTOCOL_VERSION < 774 /* < 1.21.11 */
29 char GetDataPlayerMainHand() const;
30#else
31 int GetDataPlayerMainHand() const;
32#endif
34
35#if PROTOCOL_VERSION < 774 /* < 1.21.11 */
36 void SetDataPlayerMainHand(const char data_player_main_hand);
37#else
38 void SetDataPlayerMainHand(const int data_player_main_hand);
39#endif
40 void SetDataPlayerModeCustomisation(const char data_player_mode_customisation);
41
42 };
43}
44#endif
static constexpr int metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
char GetDataPlayerModeCustomisation() const
static constexpr std::array metadata_names
static constexpr int hierarchy_metadata_count
void SetDataPlayerModeCustomisation(const char data_player_mode_customisation)
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