Botcraft 1.21.5
Loading...
Searching...
No Matches
ExperienceOrbEntity.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 static constexpr int metadata_count = 1;
14 static const std::array<std::string, metadata_count> metadata_names;
15
16#endif
18
19 public:
21 virtual ~ExperienceOrbEntity();
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#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
32 virtual ProtocolCraft::Json::Value Serialize() const override;
33
34 // Metadata stuff
35 virtual void SetMetadataValue(const int index, const std::any& value) override;
36
37 int GetDataValue() const;
38
39 void SetDataValue(const int data_value);
40#endif
41
42 protected:
43 virtual double GetWidthImpl() const override;
44 virtual double GetHeightImpl() const override;
45
46 };
47}
static constexpr int hierarchy_metadata_count
Definition Entity.hpp:62
static constexpr int metadata_count
Definition Entity.hpp:55
virtual ProtocolCraft::Json::Value Serialize() const override
virtual double GetHeightImpl() const override
void SetDataValue(const int data_value)
static const std::array< std::string, metadata_count > metadata_names
virtual void SetMetadataValue(const int index, const std::any &value) override
virtual std::string GetName() const override
static constexpr int hierarchy_metadata_count
virtual double GetWidthImpl() const override
virtual EntityType GetType() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45