Botcraft 1.21.5
Loading...
Searching...
No Matches
StriderEntity.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
2#pragma once
3
5
6namespace Botcraft
7{
9 {
10 protected:
11#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
12 static constexpr int metadata_count = 3;
13#else
14 static constexpr int metadata_count = 2;
15#endif
16 static const std::array<std::string, metadata_count> metadata_names;
18
19 public:
21 virtual ~StriderEntity();
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
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 GetDataBoostTime() const;
38 bool GetDataSuffocating() const;
39#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
40 bool GetDataSaddleId() const;
41#endif
42
43 void SetDataBoostTime(const int data_boost_time);
44 void SetDataSuffocating(const bool data_suffocating);
45#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
46 void SetDataSaddleId(const bool data_saddle_id);
47#endif
48
49 // Attribute stuff
50#if PROTOCOL_VERSION < 767 /* < 1.21 */
51 // 9e362924-01de-4ddd-a2b2-d0f7a405a174
52 static constexpr std::array<unsigned char, 16> suffocating_modifier_key= { 0x9E, 0x36, 0x29, 0x24, 0x1, 0xDE, 0x4D, 0xDD, 0xA2, 0xB2, 0xD0, 0xF7, 0xA4, 0x5, 0xA1, 0x74 };
53#else
54 inline static const std::string suffocating_modifier_key = "minecraft:suffocating";
55#endif
56
57
58 protected:
59 virtual double GetWidthImpl() const override;
60 virtual double GetHeightImpl() const override;
61
62 };
63}
64#endif
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
virtual void SetMetadataValue(const int index, const std::any &value) override
static EntityType GetClassType()
virtual EntityType GetType() const override
static const std::array< std::string, metadata_count > metadata_names
bool GetDataSuffocating() const
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
void SetDataBoostTime(const int data_boost_time)
static std::string GetClassName()
virtual double GetHeightImpl() const override
virtual double GetWidthImpl() const override
static const std::string suffocating_modifier_key
void SetDataSuffocating(const bool data_suffocating)
virtual std::string GetName() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45