Botcraft 26.3
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 private:
18 static constexpr std::array metadata_names{
19 std::string_view("data_using_item"),
20 };
21 protected:
22 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
23#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
25#else
27#endif
28
29 public:
31 virtual ~WitchEntity();
32
33 // Object related stuff
34 virtual std::string GetName() const override;
35 virtual EntityType GetType() const override;
36
37 // Static stuff, for easier comparison
38 static std::string GetClassName();
39 static EntityType GetClassType();
40
41
42 virtual ProtocolCraft::Json::Value Serialize() const override;
43
44 // Metadata stuff
45 bool GetDataUsingItem() const;
46
47 void SetDataUsingItem(const bool data_using_item);
48
49 // Attribute stuff
50#if PROTOCOL_VERSION < 767 /* < 1.21 */
51 // 5cd17e52-a79a-43d3-a529-90fde04b181e
52 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 };
53#else
54 inline static const std::string speed_modifier_drinking_key = "minecraft:drinking";
55#endif
56
57
58 protected:
59 virtual double GetWidthImpl() const override;
60 virtual double GetHeightImpl() const override;
61
62 };
63}
static constexpr int hierarchy_metadata_count
Definition MobEntity.hpp:15
static constexpr int metadata_count
Definition MobEntity.hpp:14
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
static constexpr std::array metadata_names
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()
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