Botcraft 1.21.4
Loading...
Searching...
No Matches
HorseEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 protected:
10#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
11 static constexpr int metadata_count = 1;
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 ~HorseEntity();
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 GetDataIdTypeVariant() const;
37#if PROTOCOL_VERSION < 405 /* < 1.14 */
38 std::optional<int> GetArmorType() const;
39#endif
40
41 void SetDataIdTypeVariant(const int data_id_type_variant);
42#if PROTOCOL_VERSION < 405 /* < 1.14 */
43 void SetArmorType(const std::optional<int>& armor_type);
44#endif
45
46 // Attribute stuff
47#if PROTOCOL_VERSION < 766 /* < 1.20.5 */
48 // 556e1665-8b10-40c8-8f9d-cf9b1667f295
49 static constexpr std::array<unsigned char, 16> armor_modifier_uuid = { 0x55, 0x6E, 0x16, 0x65, 0x8B, 0x10, 0x40, 0xC8, 0x8F, 0x9D, 0xCF, 0x9B, 0x16, 0x67, 0xF2, 0x95 };
50#endif
51
52 protected:
53 virtual double GetWidthImpl() const override;
54 virtual double GetHeightImpl() const override;
55
56 };
57}
static constexpr int hierarchy_metadata_count
int GetDataIdTypeVariant() const
static constexpr int hierarchy_metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
static EntityType GetClassType()
virtual void SetMetadataValue(const int index, const std::any &value) override
static std::string GetClassName()
static constexpr int metadata_count
virtual double GetWidthImpl() const override
virtual double GetHeightImpl() const override
virtual std::string GetName() const override
virtual EntityType GetType() const override
void SetDataIdTypeVariant(const int data_id_type_variant)
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