Botcraft 26.3
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 private:
11 static constexpr std::array metadata_names{
12 std::string_view("data_boost_time"),
13 std::string_view("data_suffocating"),
14#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
15 std::string_view("data_saddle_id"),
16#endif
17 };
18 protected:
19 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
21
22 public:
24 virtual ~StriderEntity();
25
26 // Object related stuff
27 virtual std::string GetName() const override;
28 virtual EntityType GetType() const override;
29
30 // Static stuff, for easier comparison
31 static std::string GetClassName();
32 static EntityType GetClassType();
33
34
35 virtual ProtocolCraft::Json::Value Serialize() const override;
36
37 // Metadata stuff
38 int GetDataBoostTime() const;
39 bool GetDataSuffocating() const;
40#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
41 bool GetDataSaddleId() const;
42#endif
43
44 void SetDataBoostTime(const int data_boost_time);
45 void SetDataSuffocating(const bool data_suffocating);
46#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
47 void SetDataSaddleId(const bool data_saddle_id);
48#endif
49
50 // Attribute stuff
51#if PROTOCOL_VERSION < 767 /* < 1.21 */
52 // 9e362924-01de-4ddd-a2b2-d0f7a405a174
53 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 };
54#else
55 inline static const std::string suffocating_modifier_key = "minecraft:suffocating";
56#endif
57
58
59 protected:
60 virtual double GetWidthImpl() const override;
61 virtual double GetHeightImpl() const override;
62
63 };
64}
65#endif
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
static constexpr std::array metadata_names
static EntityType GetClassType()
virtual EntityType GetType() const override
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