Botcraft 1.21.5
Loading...
Searching...
No Matches
FishingHookEntity.hpp
Go to the documentation of this file.
1#pragma once
2
3#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
5#else
7#endif
8
9namespace Botcraft
10{
11#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
13#else
14 class FishingHookEntity : public Entity
15#endif
16 {
17 protected:
18#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
19 static constexpr int metadata_count = 2;
20#else
21 static constexpr int metadata_count = 1;
22#endif
23 static const std::array<std::string, metadata_count> metadata_names;
24
25#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
27#else
29#endif
30
31 public:
33 virtual ~FishingHookEntity();
34
35 // Object related stuff
36 virtual std::string GetName() const override;
37 virtual EntityType GetType() const override;
38
39 // Static stuff, for easier comparison
40 static std::string GetClassName();
41 static EntityType GetClassType();
42
43 virtual ProtocolCraft::Json::Value Serialize() const override;
44
45 // Metadata stuff
46 virtual void SetMetadataValue(const int index, const std::any& value) override;
47
48 int GetDataHookedEntity() const;
49#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
50 bool GetDataBiting() const;
51#endif
52
53 void SetDataHookedEntity(const int data_hooked_entity);
54#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
55 void SetDataBiting(const bool data_biting);
56#endif
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 Entity.hpp:62
static constexpr int metadata_count
Definition Entity.hpp:55
virtual void SetMetadataValue(const int index, const std::any &value) override
virtual std::string GetName() const override
void SetDataBiting(const bool data_biting)
virtual ProtocolCraft::Json::Value Serialize() const override
virtual EntityType GetType() const override
static const std::array< std::string, metadata_count > metadata_names
static constexpr int hierarchy_metadata_count
virtual double GetWidthImpl() const override
static std::string GetClassName()
static constexpr int metadata_count
virtual double GetHeightImpl() const override
void SetDataHookedEntity(const int data_hooked_entity)
static constexpr int hierarchy_metadata_count
static constexpr int metadata_count
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45