Botcraft 26.3
Loading...
Searching...
No Matches
LlamaEntity.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_strength_id"),
12#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
13 std::string_view("data_swag_id"),
14#endif
15 std::string_view("data_variant_id"),
16 };
17 protected:
18 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
20
21 public:
23 virtual ~LlamaEntity();
24
25 // Object related stuff
26 virtual std::string GetName() const override;
27 virtual EntityType GetType() const override;
28
29 // Static stuff, for easier comparison
30 static std::string GetClassName();
31 static EntityType GetClassType();
32
33
34 virtual ProtocolCraft::Json::Value Serialize() const override;
35
36 // Metadata stuff
37 int GetDataStrengthId() const;
38#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
39 int GetDataSwagId() const;
40#endif
41 int GetDataVariantId() const;
42
43 void SetDataStrengthId(const int data_strength_id);
44#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
45 void SetDataSwagId(const int data_swag_id);
46#endif
47 void SetDataVariantId(const int data_variant_id);
48
49 protected:
50 virtual double GetWidthImpl() const override;
51 virtual double GetHeightImpl() const override;
52
53 };
54}
static std::string GetClassName()
static EntityType GetClassType()
int GetDataVariantId() const
virtual std::string GetName() const override
static constexpr int metadata_count
void SetDataVariantId(const int data_variant_id)
static constexpr int hierarchy_metadata_count
void SetDataStrengthId(const int data_strength_id)
int GetDataStrengthId() const
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr std::array metadata_names
virtual EntityType GetType() const override
virtual double GetWidthImpl() const override
virtual double GetHeightImpl() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45