Botcraft 1.21.4
Loading...
Searching...
No Matches
LlamaEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 protected:
10#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
11 static constexpr int metadata_count = 3;
12#else
13 static constexpr int metadata_count = 2;
14#endif
15 static const std::array<std::string, metadata_count> metadata_names;
17
18 public:
20 virtual ~LlamaEntity();
21
22 // Object related stuff
23 virtual std::string GetName() const override;
24 virtual EntityType GetType() const override;
25
26 // Static stuff, for easier comparison
27 static std::string GetClassName();
28 static EntityType GetClassType();
29
30
31 virtual ProtocolCraft::Json::Value Serialize() const override;
32
33 // Metadata stuff
34 virtual void SetMetadataValue(const int index, const std::any& value) override;
35
36 int GetDataStrengthId() const;
37#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
38 int GetDataSwagId() const;
39#endif
40 int GetDataVariantId() const;
41
42 void SetDataStrengthId(const int data_strength_id);
43#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
44 void SetDataSwagId(const int data_swag_id);
45#endif
46 void SetDataVariantId(const int data_variant_id);
47
48 protected:
49 virtual double GetWidthImpl() const override;
50 virtual double GetHeightImpl() const override;
51
52 };
53}
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
virtual EntityType GetType() const override
static const std::array< std::string, metadata_count > metadata_names
virtual double GetWidthImpl() const override
virtual void SetMetadataValue(const int index, const std::any &value) 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