Botcraft 1.21.4
Loading...
Searching...
No Matches
GoatEntity.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
2#pragma once
3
5
6namespace Botcraft
7{
8 class GoatEntity : public AnimalEntity
9 {
10 protected:
11#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
12 static constexpr int metadata_count = 3;
13#else
14 static constexpr int metadata_count = 1;
15#endif
16 static const std::array<std::string, metadata_count> metadata_names;
18
19 public:
20 GoatEntity();
21 virtual ~GoatEntity();
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
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 GetDataIsScreamingGoat() const;
38#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
39 bool GetDataHasLeftHorn() const;
40 bool GetDataHasRightHorn() const;
41#endif
42
43 void SetDataIsScreamingGoat(const bool data_is_screaming_goat);
44#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
45 void SetDataHasLeftHorn(const bool data_has_left_horn);
46 void SetDataHasRightHorn(const bool data_has_right_horn);
47#endif
48
49 // Attribute stuff
50 double GetAttributeAttackDamageValue() const;
51
52 protected:
53 virtual double GetWidthImpl() const override;
54 virtual double GetHeightImpl() const override;
55
56 };
57}
58#endif
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
void SetDataIsScreamingGoat(const bool data_is_screaming_goat)
virtual EntityType GetType() const override
static EntityType GetClassType()
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
bool GetDataIsScreamingGoat() const
static const std::array< std::string, metadata_count > metadata_names
virtual double GetWidthImpl() const override
void SetDataHasRightHorn(const bool data_has_right_horn)
static std::string GetClassName()
virtual std::string GetName() const override
virtual double GetHeightImpl() const override
bool GetDataHasRightHorn() const
void SetDataHasLeftHorn(const bool data_has_left_horn)
double GetAttributeAttackDamageValue() const
bool GetDataHasLeftHorn() const
virtual void SetMetadataValue(const int index, const std::any &value) override
virtual ProtocolCraft::Json::Value Serialize() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45