Botcraft 26.3
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#if PROTOCOL_VERSION > 770 /* > 1.21.5 */
19 private:
20 static constexpr std::array metadata_names{
21 std::string_view("data_direction"),
22 };
23#endif
24 protected:
25#if PROTOCOL_VERSION < 771 /* < 1.21.6 */
26 static constexpr int metadata_count = 0;
27#else
28 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
29#endif
30#if PROTOCOL_VERSION < 767 /* < 1.21 */
32#else
34#endif
35
36 public:
38 virtual ~HangingEntity();
39
40 virtual bool IsHangingEntity() const override;
41
42#if PROTOCOL_VERSION > 770 /* > 1.21.5 */
43 virtual ProtocolCraft::Json::Value Serialize() const override;
44
45 // Metadata stuff
46 int GetDataDirection() const;
47
48 void SetDataDirection(const int data_direction);
49#endif
50 };
51}
static constexpr int hierarchy_metadata_count
static constexpr int hierarchy_metadata_count
Definition Entity.hpp:73
static constexpr int metadata_count
Definition Entity.hpp:72
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 constexpr std::array 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