Botcraft 26.3
Loading...
Searching...
No Matches
WitherSkullEntity.cpp
Go to the documentation of this file.
2
3namespace Botcraft
4{
6 {
7 // Initialize all metadata with default values
9 SetDataDangerous(false);
10 }
11
16
17
18 std::string WitherSkullEntity::GetName() const
19 {
20 return "wither_skull";
21 }
22
27
28
30 {
31 return "wither_skull";
32 }
33
38
39
41 {
43
44 output["metadata"]["data_dangerous"] = GetDataDangerous();
45
46 return output;
47 }
48
49
51 {
52 return GetMetadata<bool>(BOTCRAFT_ENTITY_METADATA_INDEX("data_dangerous"));
53 }
54
55
56 void WitherSkullEntity::SetDataDangerous(const bool data_dangerous)
57 {
58 SetMetadata(BOTCRAFT_ENTITY_METADATA_INDEX("data_dangerous"), data_dangerous);
59 }
60
61
63 {
64 return 0.3125;
65 }
66
68 {
69 return 0.3125;
70 }
71
72}
void SetMetadata(const int index, const std::any &value)
Definition Entity.cpp:366
virtual ProtocolCraft::Json::Value Serialize() const
Definition Entity.cpp:1246
std::vector< std::any > metadata
Definition Entity.hpp:335
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr int hierarchy_metadata_count
static std::string GetClassName()
virtual double GetHeightImpl() const override
virtual std::string GetName() const override
virtual double GetWidthImpl() const override
void SetDataDangerous(const bool data_dangerous)
virtual EntityType GetType() const override
static constexpr int metadata_count
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