Botcraft 26.1.2
Loading...
Searching...
No Matches
AgeableMobEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 protected:
10#if PROTOCOL_VERSION < 775 /* < 26.1 */
11 static constexpr int metadata_count = 1;
12#else
13 static constexpr int metadata_count = 2;
14#endif
15 static const std::array<std::string, metadata_count> metadata_names;
17
18 public:
20 virtual ~AgeableMobEntity();
21
22 virtual bool IsAgeableMob() const override;
23
24 virtual ProtocolCraft::Json::Value Serialize() const override;
25
26 // Metadata stuff
27 virtual void SetMetadataValue(const int index, const std::any& value) override;
28
29 bool GetDataBabyId() const;
30#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
31 bool GetAgeLocked() const;
32#endif
33
34 void SetDataBabyId(const bool data_baby_id);
35#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
36 void SetAgeLocked(const bool age_locked);
37#endif
38
39 };
40}
void SetAgeLocked(const bool age_locked)
static constexpr int metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
static const std::array< std::string, metadata_count > metadata_names
static constexpr int hierarchy_metadata_count
virtual void SetMetadataValue(const int index, const std::any &value) override
virtual bool IsAgeableMob() const override
void SetDataBabyId(const bool data_baby_id)
static constexpr int hierarchy_metadata_count
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45