Botcraft 1.21.4
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 protected:
18 static constexpr int metadata_count = 1;
19 static const std::array<std::string, metadata_count> metadata_names;
21
22 public:
24 virtual ~OcelotEntity();
25
26 // Object related stuff
27 virtual std::string GetName() const override;
28 virtual EntityType GetType() const override;
29
30 // Static stuff, for easier comparison
31 static std::string GetClassName();
32 static EntityType GetClassType();
33
34
35 virtual ProtocolCraft::Json::Value Serialize() const override;
36
37 // Metadata stuff
38 virtual void SetMetadataValue(const int index, const std::any& value) override;
39
40#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
41 bool GetDataTrusting() const;
42
43 void SetDataTrusting(const bool data_trusting);
44#else
45 int GetDataTypeId() const;
46
47 void SetDataTypeId(const int data_type_id);
48#endif
49
50 // Attribute stuff
51 double GetAttributeAttackDamageValue() const;
52
53 protected:
54 virtual double GetWidthImpl() const override;
55 virtual double GetHeightImpl() const override;
56
57 };
58}
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
bool GetDataTrusting() const
double GetAttributeAttackDamageValue() const
virtual void SetMetadataValue(const int index, const std::any &value) override
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)
static const std::array< std::string, metadata_count > metadata_names
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