Botcraft 26.3
Loading...
Searching...
No Matches
OcelotEntity.hpp
Go to the documentation of this file.
1#pragma once
2
3#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
5#else
7#endif
8
9namespace Botcraft
10{
11#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
13#else
15#endif
16 {
17 private:
18 static constexpr std::array metadata_names{
19#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
20 std::string_view("data_trusting"),
21#else
22 std::string_view("data_type_id"),
23#endif
24 };
25 protected:
26 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
28
29 public:
31 virtual ~OcelotEntity();
32
33 // Object related stuff
34 virtual std::string GetName() const override;
35 virtual EntityType GetType() const override;
36
37 // Static stuff, for easier comparison
38 static std::string GetClassName();
39 static EntityType GetClassType();
40
41
42 virtual ProtocolCraft::Json::Value Serialize() const override;
43
44 // Metadata stuff
45#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
46 bool GetDataTrusting() const;
47
48 void SetDataTrusting(const bool data_trusting);
49#else
50 int GetDataTypeId() const;
51
52 void SetDataTypeId(const int data_type_id);
53#endif
54
55 // Attribute stuff
56 double GetAttributeAttackDamageValue() const;
57
58 protected:
59 virtual double GetWidthImpl() const override;
60 virtual double GetHeightImpl() const override;
61
62 };
63}
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
bool GetDataTrusting() const
double GetAttributeAttackDamageValue() const
static constexpr std::array metadata_names
virtual std::string GetName() const override
static EntityType GetClassType()
virtual EntityType GetType() const override
static constexpr int metadata_count
void SetDataTrusting(const bool data_trusting)
virtual double GetHeightImpl() const override
static constexpr int hierarchy_metadata_count
static std::string GetClassName()
virtual double GetWidthImpl() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45