Botcraft 26.3
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 private:
18 static constexpr std::array metadata_names{
19 std::string_view("data_hooked_entity"),
20#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
21 std::string_view("data_biting"),
22#endif
23 };
24 protected:
25 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
26#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
28#else
30#endif
31
32 public:
34 virtual ~FishingHookEntity();
35
36 // Object related stuff
37 virtual std::string GetName() const override;
38 virtual EntityType GetType() const override;
39
40 // Static stuff, for easier comparison
41 static std::string GetClassName();
42 static EntityType GetClassType();
43
44 virtual ProtocolCraft::Json::Value Serialize() const override;
45
46 // Metadata stuff
47 int GetDataHookedEntity() const;
48#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
49 bool GetDataBiting() const;
50#endif
51
52 void SetDataHookedEntity(const int data_hooked_entity);
53#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
54 void SetDataBiting(const bool data_biting);
55#endif
56
57 protected:
58 virtual double GetWidthImpl() const override;
59 virtual double GetHeightImpl() const override;
60
61 };
62}
static constexpr int hierarchy_metadata_count
Definition Entity.hpp:73
static constexpr int metadata_count
Definition Entity.hpp:72
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 constexpr int hierarchy_metadata_count
virtual double GetWidthImpl() const override
static std::string GetClassName()
static constexpr std::array metadata_names
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