Botcraft 26.3
Loading...
Searching...
No Matches
WardenEntity.cpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
3
4namespace Botcraft
5{
22
27
28
29 std::string WardenEntity::GetName() const
30 {
31 return "warden";
32 }
33
38
39
41 {
42 return "warden";
43 }
44
49
50
52 {
54
55 output["metadata"]["client_anger_level"] = GetClientAngerLevel();
56
57 return output;
58 }
59
60
62 {
63 return GetMetadata<int>(BOTCRAFT_ENTITY_METADATA_INDEX("client_anger_level"));
64 }
65
66
67 void WardenEntity::SetClientAngerLevel(const int client_anger_level)
68 {
69 SetMetadata(BOTCRAFT_ENTITY_METADATA_INDEX("client_anger_level"), client_anger_level);
70 }
71
72
74 {
75 return 0.9;
76 }
77
79 {
80 return 2.9;
81 }
82
83}
84#endif
void SetMetadata(const int index, const std::any &value)
Definition Entity.cpp:366
std::vector< std::any > metadata
Definition Entity.hpp:335
std::map< EntityAttribute::Type, EntityAttribute > attributes
virtual ProtocolCraft::Json::Value Serialize() const override
int GetClientAngerLevel() const
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr int metadata_count
static std::string GetClassName()
static EntityType GetClassType()
virtual EntityType GetType() const override
virtual double GetHeightImpl() const override
virtual double GetWidthImpl() const override
static constexpr int hierarchy_metadata_count
void SetClientAngerLevel(const int client_anger_level)
virtual std::string GetName() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45
#define BOTCRAFT_ENTITY_METADATA_INDEX(name)
Definition Entity.hpp:347