Botcraft 1.21.4
Loading...
Searching...
No Matches
WitchEntity.hpp
Go to the documentation of this file.
1#pragma once
2
3#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
5#else
7#endif
8
9namespace Botcraft
10{
11#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
13#else
14 class WitchEntity : public MobEntity
15#endif
16 {
17 protected:
18 static constexpr int metadata_count = 1;
19 static const std::array<std::string, metadata_count> metadata_names;
20#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
22#else
24#endif
25
26 public:
28 virtual ~WitchEntity();
29
30 // Object related stuff
31 virtual std::string GetName() const override;
32 virtual EntityType GetType() const override;
33
34 // Static stuff, for easier comparison
35 static std::string GetClassName();
36 static EntityType GetClassType();
37
38
39 virtual ProtocolCraft::Json::Value Serialize() const override;
40
41 // Metadata stuff
42 virtual void SetMetadataValue(const int index, const std::any& value) override;
43
44 bool GetDataUsingItem() const;
45
46 void SetDataUsingItem(const bool data_using_item);
47
48 // Attribute stuff
49#if PROTOCOL_VERSION < 767 /* < 1.21 */
50 // 5cd17e52-a79a-43d3-a529-90fde04b181e
51 static constexpr std::array<unsigned char, 16> speed_modifier_drinking_key= { 0x5C, 0xD1, 0x7E, 0x52, 0xA7, 0x9A, 0x43, 0xD3, 0xA5, 0x29, 0x90, 0xFD, 0xE0, 0x4B, 0x18, 0x1E };
52#else
53 inline static const std::string speed_modifier_drinking_key = "minecraft:drinking";
54#endif
55
56
57 protected:
58 virtual double GetWidthImpl() const override;
59 virtual double GetHeightImpl() const override;
60
61 };
62}
static constexpr int hierarchy_metadata_count
Definition MobEntity.hpp:12
static constexpr int metadata_count
Definition MobEntity.hpp:10
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
virtual std::string GetName() const override
static constexpr int metadata_count
bool GetDataUsingItem() const
static constexpr int hierarchy_metadata_count
void SetDataUsingItem(const bool data_using_item)
static std::string GetClassName()
static const std::array< std::string, metadata_count > metadata_names
virtual void SetMetadataValue(const int index, const std::any &value) override
virtual double GetWidthImpl() const override
virtual ProtocolCraft::Json::Value Serialize() const override
virtual double GetHeightImpl() const override
static const std::string speed_modifier_drinking_key
virtual EntityType GetType() const override
static EntityType GetClassType()
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45