Botcraft 26.3
Loading...
Searching...
No Matches
AllayEntity.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
2#pragma once
3
5
6namespace Botcraft
7{
9 {
10#if PROTOCOL_VERSION > 759 /* > 1.19 */
11 private:
12 static constexpr std::array metadata_names{
13 std::string_view("data_dancing"),
14 std::string_view("data_can_duplicate"),
15 };
16#endif
17 protected:
18#if PROTOCOL_VERSION < 760 /* < 1.19.1 */
19 static constexpr int metadata_count = 0;
20#else
21 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
22#endif
24
25 public:
27 virtual ~AllayEntity();
28
29 // Object related stuff
30 virtual std::string GetName() const override;
31 virtual EntityType GetType() const override;
32
33 // Static stuff, for easier comparison
34 static std::string GetClassName();
35 static EntityType GetClassType();
36
37#if PROTOCOL_VERSION > 759 /* > 1.19 */
38 virtual ProtocolCraft::Json::Value Serialize() const override;
39
40 // Metadata stuff
41 bool GetDataDancing() const;
42 bool GetDataCanDuplicate() const;
43
44 void SetDataDancing(const bool data_dancing);
45 void SetDataCanDuplicate(const bool data_can_duplicate);
46#endif
47
48 // Attribute stuff
49 double GetAttributeFlyingSpeedValue() const;
50 double GetAttributeAttackDamageValue() const;
51
52 protected:
53 virtual double GetWidthImpl() const override;
54 virtual double GetHeightImpl() const override;
55
56 };
57}
58#endif
void SetDataCanDuplicate(const bool data_can_duplicate)
bool GetDataDancing() const
double GetAttributeAttackDamageValue() const
void SetDataDancing(const bool data_dancing)
static constexpr int metadata_count
double GetAttributeFlyingSpeedValue() const
bool GetDataCanDuplicate() const
static std::string GetClassName()
static constexpr std::array metadata_names
virtual double GetHeightImpl() const override
virtual ProtocolCraft::Json::Value Serialize() const override
virtual double GetWidthImpl() const override
static constexpr int hierarchy_metadata_count
virtual std::string GetName() const override
virtual EntityType GetType() const override
static EntityType GetClassType()
static constexpr int hierarchy_metadata_count
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45