Botcraft 26.3
Loading...
Searching...
No Matches
EnderManEntity.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_carry_state"),
12 std::string_view("data_creepy"),
13#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
14 std::string_view("data_stared_at"),
15#endif
16 };
17 protected:
18 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
20
21 public:
23 virtual ~EnderManEntity();
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 GetDataCarryState() const;
38 bool GetDataCreepy() const;
39#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
40 bool GetDataStaredAt() const;
41#endif
42
43 void SetDataCarryState(const int data_carry_state);
44 void SetDataCreepy(const bool data_creepy);
45#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
46 void SetDataStaredAt(const bool data_stared_at);
47#endif
48
49 // Attribute stuff
50#if PROTOCOL_VERSION < 767 /* < 1.21 */
51 // 020e0dfb-87ae-4653-9556-831010e291a0
52 static constexpr std::array<unsigned char, 16> speed_modifier_attacking_key = { 0x2, 0xE, 0xD, 0xFB, 0x87, 0xAE, 0x46, 0x53, 0x95, 0x56, 0x83, 0x10, 0x10, 0xE2, 0x91, 0xA0 };
53#else
54 inline static const std::string speed_modifier_attacking_key = "minecraft:attacking";
55#endif
56
57
58 protected:
59 virtual double GetWidthImpl() const override;
60 virtual double GetHeightImpl() const override;
61
62 };
63}
void SetDataCarryState(const int data_carry_state)
virtual std::string GetName() const override
static constexpr std::array metadata_names
virtual double GetWidthImpl() const override
void SetDataStaredAt(const bool data_stared_at)
static constexpr int hierarchy_metadata_count
virtual double GetHeightImpl() const override
static EntityType GetClassType()
virtual ProtocolCraft::Json::Value Serialize() const override
static std::string GetClassName()
void SetDataCreepy(const bool data_creepy)
static constexpr int metadata_count
virtual EntityType GetType() const override
static const std::string speed_modifier_attacking_key
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45