Botcraft 1.21.4
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 protected:
11#if PROTOCOL_VERSION < 760 /* < 1.19.1 */
12 static constexpr int metadata_count = 0;
13#else
14 static constexpr int metadata_count = 2;
15 static const std::array<std::string, metadata_count> metadata_names;
16#endif
18
19 public:
21 virtual ~AllayEntity();
22
23 // Object related stuff
24 virtual std::string GetName() const override;
25 virtual EntityType GetType() const override;
26
27 // Static stuff, for easier comparison
28 static std::string GetClassName();
29 static EntityType GetClassType();
30
31#if PROTOCOL_VERSION > 759 /* > 1.19 */
32 virtual ProtocolCraft::Json::Value Serialize() const override;
33
34 // Metadata stuff
35 virtual void SetMetadataValue(const int index, const std::any& value) override;
36
37 bool GetDataDancing() const;
38 bool GetDataCanDuplicate() const;
39
40 void SetDataDancing(const bool data_dancing);
41 void SetDataCanDuplicate(const bool data_can_duplicate);
42#endif
43
44 // Attribute stuff
45 double GetAttributeFlyingSpeedValue() const;
46 double GetAttributeAttackDamageValue() const;
47
48 protected:
49 virtual double GetWidthImpl() const override;
50 virtual double GetHeightImpl() const override;
51
52 };
53}
54#endif
void SetDataCanDuplicate(const bool data_can_duplicate)
bool GetDataDancing() const
double GetAttributeAttackDamageValue() const
virtual void SetMetadataValue(const int index, const std::any &value) override
void SetDataDancing(const bool data_dancing)
static constexpr int metadata_count
double GetAttributeFlyingSpeedValue() const
bool GetDataCanDuplicate() const
static std::string GetClassName()
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 const std::array< std::string, metadata_count > metadata_names
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