Botcraft 1.21.4
Loading...
Searching...
No Matches
EnderManEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 protected:
10#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
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 ~EnderManEntity();
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 GetDataCarryState() const;
37 bool GetDataCreepy() const;
38#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
39 bool GetDataStaredAt() const;
40#endif
41
42 void SetDataCarryState(const int data_carry_state);
43 void SetDataCreepy(const bool data_creepy);
44#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
45 void SetDataStaredAt(const bool data_stared_at);
46#endif
47
48 // Attribute stuff
49#if PROTOCOL_VERSION < 767 /* < 1.21 */
50 // 020e0dfb-87ae-4653-9556-831010e291a0
51 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 };
52#else
53 inline static const std::string speed_modifier_attacking_key = "minecraft:attacking";
54#endif
55
56
57 protected:
58 virtual double GetWidthImpl() const override;
59 virtual double GetHeightImpl() const override;
60
61 };
62}
void SetDataCarryState(const int data_carry_state)
virtual std::string GetName() const override
virtual double GetWidthImpl() const override
virtual void SetMetadataValue(const int index, const std::any &value) override
static const std::array< std::string, metadata_count > metadata_names
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