Botcraft 1.21.4
Loading...
Searching...
No Matches
WolfEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 protected:
10
11#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
12 static constexpr int metadata_count = 4;
13#elif PROTOCOL_VERSION > 578 /* > 1.15.2 */
14 static constexpr int metadata_count = 3;
15#elif PROTOCOL_VERSION > 498 /* > 1.14.4 */
16 static constexpr int metadata_count = 2;
17#else
18 static constexpr int metadata_count = 3;
19#endif
20 static const std::array<std::string, metadata_count> metadata_names;
22
23 public:
24 WolfEntity();
25 virtual ~WolfEntity();
26
27 // Object related stuff
28 virtual std::string GetName() const override;
29 virtual EntityType GetType() const override;
30
31 // Static stuff, for easier comparison
32 static std::string GetClassName();
33 static EntityType GetClassType();
34
35
36 virtual ProtocolCraft::Json::Value Serialize() const override;
37
38 // Metadata stuff
39 virtual void SetMetadataValue(const int index, const std::any& value) override;
40
41
42#if PROTOCOL_VERSION < 499 /* < 1.15 */
43 float GetDataHealthId() const;
44#endif
45 bool GetDataInterestedId() const;
46 int GetDataCollarColor() const;
47#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
48 int GetDataRemainingAngerTime() const;
49#endif
50#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
51 int GetDataVariantId() const;
52#endif
53
54#if PROTOCOL_VERSION < 499 /* < 1.15 */
55 void SetDataHealthId(const float data_health_id);
56#endif
57 void SetDataInterestedId(const bool data_interested_id);
58 void SetDataCollarColor(const int data_collar_color);
59#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
60 void SetDataRemainingAngerTime(const int data_remaining_anger_time);
61#endif
62#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
63 void SetDataVariantId(const int data_variant_id);
64#endif
65
66 // Attribute stuff
67 double GetAttributeAttackDamageValue() const;
68
69 protected:
70 virtual double GetWidthImpl() const override;
71 virtual double GetHeightImpl() const override;
72
73 };
74}
void SetDataHealthId(const float data_health_id)
float GetDataHealthId() const
static constexpr int hierarchy_metadata_count
static std::string GetClassName()
virtual double GetWidthImpl() const override
int GetDataRemainingAngerTime() const
virtual EntityType GetType() const override
virtual ProtocolCraft::Json::Value Serialize() const override
void SetDataVariantId(const int data_variant_id)
static EntityType GetClassType()
virtual std::string GetName() const override
bool GetDataInterestedId() const
int GetDataCollarColor() const
virtual void SetMetadataValue(const int index, const std::any &value) override
static constexpr int hierarchy_metadata_count
void SetDataCollarColor(const int data_collar_color)
int GetDataVariantId() const
virtual double GetHeightImpl() const override
double GetAttributeAttackDamageValue() const
void SetDataInterestedId(const bool data_interested_id)
static const std::array< std::string, metadata_count > metadata_names
static constexpr int metadata_count
void SetDataRemainingAngerTime(const int data_remaining_anger_time)
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45