Botcraft 1.21.4
Loading...
Searching...
No Matches
ShulkerEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 protected:
10#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
11 static constexpr int metadata_count = 3;
12#else
13 static constexpr int metadata_count = 4;
14#endif
15 static const std::array<std::string, metadata_count> metadata_names;
17
18 public:
20 virtual ~ShulkerEntity();
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
37#if PROTOCOL_VERSION < 755 /* < 1.17 */
38 std::optional<Position> GetDataAttachPosId() const;
39#endif
40 char GetDataPeekId() const;
41 char GetDataColorId() const;
42
43 void SetDataAttachFaceId(const Direction data_attach_face_id);
44#if PROTOCOL_VERSION < 755 /* < 1.17 */
45 void SetDataAttachPosId(const std::optional<Position>& data_attach_pos_id);
46#endif
47 void SetDataPeekId(const char data_peek_id);
48 void SetDataColorId(const char data_color_id);
49
50 // Attribute stuff
51#if PROTOCOL_VERSION < 767 /* < 1.21 */
52 // 7e0292f2-9434-48d5-a29f-9583af7df27f
53 static constexpr std::array<unsigned char, 16> covered_armor_modifier_key = { 0x7E, 0x2, 0x92, 0xF2, 0x94, 0x34, 0x48, 0xD5, 0xA2, 0x9F, 0x95, 0x83, 0xAF, 0x7D, 0xF2, 0x7F };
54#else
55 inline static const std::string covered_armor_modifier_key = "minecraft:covered";
56#endif
57
58
59 protected:
60 virtual double GetWidthImpl() const override;
61 virtual double GetHeightImpl() const override;
62
63 };
64}
static constexpr int hierarchy_metadata_count
void SetDataPeekId(const char data_peek_id)
static const std::array< std::string, metadata_count > metadata_names
virtual std::string GetName() const override
static EntityType GetClassType()
Direction GetDataAttachFaceId() const
virtual double GetHeightImpl() const override
virtual EntityType GetType() const override
static constexpr int metadata_count
static std::string GetClassName()
static constexpr int hierarchy_metadata_count
static const std::string covered_armor_modifier_key
virtual void SetMetadataValue(const int index, const std::any &value) override
virtual double GetWidthImpl() const override
void SetDataAttachFaceId(const Direction data_attach_face_id)
virtual ProtocolCraft::Json::Value Serialize() const override
void SetDataColorId(const char data_color_id)
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45