Botcraft 26.1.2
Loading...
Searching...
No Matches
ChickenEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 protected:
10#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
11 static constexpr int metadata_count = 0;
12#else
13#if PROTOCOL_VERSION < 775 /* < 26.1 */
14 static constexpr int metadata_count = 1;
15#else
16 static constexpr int metadata_count = 2;
17#endif
18 static const std::array<std::string, metadata_count> metadata_names;
19#endif
21
22 public:
24 virtual ~ChickenEntity();
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#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
35 virtual ProtocolCraft::Json::Value Serialize() const override;
36
37 // Metadata stuff
38 virtual void SetMetadataValue(const int index, const std::any& value) override;
39
40 int GetDataVariantId() const;
41#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
42 int GetDataSoundVariantId() const;
43#endif
44
45 void SetDataVariantId(const int data_variant_id);
46#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
47 void SetDataSoundVariantId(const int data_sound_variant_id);
48#endif
49#endif
50
51 protected:
52 virtual double GetWidthImpl() const override;
53 virtual double GetHeightImpl() const override;
54
55 };
56}
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 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 void SetMetadataValue(const int index, const std::any &value) override
virtual double GetHeightImpl() const override
static const std::array< std::string, metadata_count > metadata_names
virtual EntityType GetType() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45