Botcraft 26.3
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 private:
11 static constexpr std::array metadata_names{
12 std::string_view("data_is_screaming_goat"),
13#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
14 std::string_view("data_has_left_horn"),
15 std::string_view("data_has_right_horn"),
16#endif
17 };
18 protected:
19 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
21
22 public:
23 GoatEntity();
24 virtual ~GoatEntity();
25
26 // Object related stuff
27 virtual std::string GetName() const override;
28 virtual EntityType GetType() const override;
29
30 // Static stuff, for easier comparison
31 static std::string GetClassName();
32 static EntityType GetClassType();
33
34
35 virtual ProtocolCraft::Json::Value Serialize() const override;
36
37 // Metadata stuff
38 bool GetDataIsScreamingGoat() const;
39#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
40 bool GetDataHasLeftHorn() const;
41 bool GetDataHasRightHorn() const;
42#endif
43
44 void SetDataIsScreamingGoat(const bool data_is_screaming_goat);
45#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
46 void SetDataHasLeftHorn(const bool data_has_left_horn);
47 void SetDataHasRightHorn(const bool data_has_right_horn);
48#endif
49
50 // Attribute stuff
51 double GetAttributeAttackDamageValue() const;
52
53 protected:
54 virtual double GetWidthImpl() const override;
55 virtual double GetHeightImpl() const override;
56
57 };
58}
59#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
virtual double GetWidthImpl() const override
static constexpr std::array metadata_names
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 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