Botcraft 26.3
Loading...
Searching...
No Matches
ChickenEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
10 private:
11 static constexpr std::array metadata_names{
12 std::string_view("data_variant_id"),
13#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
14 std::string_view("data_sound_variant_id"),
15#endif
16 };
17#endif
18 protected:
19#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
20 static constexpr int metadata_count = 0;
21#else
22 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
23#endif
25
26 public:
28 virtual ~ChickenEntity();
29
30 // Object related stuff
31 virtual std::string GetName() const override;
32 virtual EntityType GetType() const override;
33
34 // Static stuff, for easier comparison
35 static std::string GetClassName();
36 static EntityType GetClassType();
37
38#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
39 virtual ProtocolCraft::Json::Value Serialize() const override;
40
41 // Metadata stuff
42 int GetDataVariantId() const;
43#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
44 int GetDataSoundVariantId() const;
45#endif
46
47 void SetDataVariantId(const int data_variant_id);
48#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
49 void SetDataSoundVariantId(const int data_sound_variant_id);
50#endif
51#endif
52
53 protected:
54 virtual double GetWidthImpl() const override;
55 virtual double GetHeightImpl() const override;
56
57 };
58}
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
int GetDataSoundVariantId() const
virtual std::string GetName() const override
static constexpr int hierarchy_metadata_count
static constexpr std::array metadata_names
static constexpr int metadata_count
void SetDataVariantId(const int data_variant_id)
virtual double GetWidthImpl() const override
static EntityType GetClassType()
void SetDataSoundVariantId(const int data_sound_variant_id)
static std::string GetClassName()
virtual double GetHeightImpl() const override
virtual EntityType GetType() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45