Botcraft 26.3
Loading...
Searching...
No Matches
ExperienceOrbEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
10 private:
11 static constexpr std::array metadata_names{
12 std::string_view("data_value"),
13 };
14#endif
15 protected:
16#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
17 static constexpr int metadata_count = 0;
18#else
19 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
20#endif
22
23 public:
25 virtual ~ExperienceOrbEntity();
26
27 // Object related stuff
28 virtual std::string GetName() const override;
29 virtual EntityType GetType() const override;
30
31 // Static stuff, for easier comparison
32 static std::string GetClassName();
33 static EntityType GetClassType();
34
35#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
36 virtual ProtocolCraft::Json::Value Serialize() const override;
37
38 // Metadata stuff
39 int GetDataValue() const;
40
41 void SetDataValue(const int data_value);
42#endif
43
44 protected:
45 virtual double GetWidthImpl() const override;
46 virtual double GetHeightImpl() const override;
47
48 };
49}
static constexpr int hierarchy_metadata_count
Definition Entity.hpp:73
static constexpr int metadata_count
Definition Entity.hpp:72
static constexpr std::array metadata_names
virtual ProtocolCraft::Json::Value Serialize() const override
virtual double GetHeightImpl() const override
void SetDataValue(const int data_value)
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