Botcraft 1.21.7
Loading...
Searching...
No Matches
HangingEntity.hpp
Go to the documentation of this file.
1#pragma once
2
3#if PROTOCOL_VERSION < 767 /* < 1.21 */
5#else
7#endif
8
9namespace Botcraft
10{
12#if PROTOCOL_VERSION < 767 /* < 1.21 */
13 public Entity
14#else
16#endif
17 {
18 protected:
19#if PROTOCOL_VERSION < 771 /* < 1.21.6 */
20 static constexpr int metadata_count = 0;
21#else
22 static constexpr int metadata_count = 1;
23 static const std::array<std::string, metadata_count> metadata_names;
24#endif
25#if PROTOCOL_VERSION < 767 /* < 1.21 */
27#else
29#endif
30
31 public:
33 virtual ~HangingEntity();
34
35 virtual bool IsHangingEntity() const override;
36
37#if PROTOCOL_VERSION > 770 /* > 1.21.5 */
38 virtual ProtocolCraft::Json::Value Serialize() const override;
39
40 // Metadata stuff
41 virtual void SetMetadataValue(const int index, const std::any& value) override;
42
43 int GetDataDirection() const;
44
45 void SetDataDirection(const int data_direction);
46#endif
47 };
48}
static constexpr int hierarchy_metadata_count
static constexpr int hierarchy_metadata_count
Definition Entity.hpp:62
static constexpr int metadata_count
Definition Entity.hpp:55
virtual void SetMetadataValue(const int index, const std::any &value) override
virtual ProtocolCraft::Json::Value Serialize() const override
virtual bool IsHangingEntity() const override
static constexpr int hierarchy_metadata_count
void SetDataDirection(const int data_direction)
static const std::array< std::string, metadata_count > metadata_names
static constexpr int metadata_count
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45