Botcraft 26.3
Loading...
Searching...
No Matches
AgeableMobEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 private:
10 static constexpr std::array metadata_names{
11 std::string_view("data_baby_id"),
12#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
13 std::string_view("age_locked"),
14#endif
15 };
16 protected:
17 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
19
20 public:
22 virtual ~AgeableMobEntity();
23
24 virtual bool IsAgeableMob() const override;
25
26 virtual ProtocolCraft::Json::Value Serialize() const override;
27
28 // Metadata stuff
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 constexpr int hierarchy_metadata_count
virtual bool IsAgeableMob() const override
void SetDataBabyId(const bool data_baby_id)
static constexpr std::array metadata_names
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