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