Botcraft 26.1.2
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 protected:
11#if PROTOCOL_VERSION < 775 /* < 26.1 */
12 static constexpr int metadata_count = 0;
13#else
14 static constexpr int metadata_count = 1;
15 static const std::array<std::string, metadata_count> metadata_names;
16#endif
18
19 public:
21 virtual ~TadpoleEntity();
22
23 // Object related stuff
24 virtual std::string GetName() const override;
25 virtual EntityType GetType() const override;
26
27 // Static stuff, for easier comparison
28 static std::string GetClassName();
29 static EntityType GetClassType();
30
31
32#if PROTOCOL_VERSION > 774 /* > 1.21.11 */
33 virtual ProtocolCraft::Json::Value Serialize() const override;
34
35 // Metadata stuff
36 virtual void SetMetadataValue(const int index, const std::any& value) override;
37
38 bool GetAgeLocked() const;
39
40 void SetAgeLocked(const bool age_locked);
41#endif
42
43 protected:
44 virtual double GetWidthImpl() const override;
45 virtual double GetHeightImpl() const override;
46
47 };
48}
49#endif
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
static std::string GetClassName()
static constexpr int hierarchy_metadata_count
virtual void SetMetadataValue(const int index, const std::any &value) override
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
static const std::array< std::string, metadata_count > metadata_names
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45