Botcraft 26.3
Loading...
Searching...
No Matches
EnderDragonEntity.cpp
Go to the documentation of this file.
2
3namespace Botcraft
4{
6 {
7 // Initialize all metadata with default values
9 SetDataPhase(10);
10
11 // Initialize all attributes with default values
13#if PROTOCOL_VERSION > 770 /* > 1.21.5 */
15#endif
16 }
17
22
23
24 std::string EnderDragonEntity::GetName() const
25 {
26 return "ender_dragon";
27 }
28
33
34
36 {
37 return "ender_dragon";
38 }
39
44
45
47 {
49
50 output["metadata"]["data_phase"] = GetDataPhase();
51
52 return output;
53 }
54
55
57 {
58 return GetMetadata<int>(BOTCRAFT_ENTITY_METADATA_INDEX("data_phase"));
59 }
60
61
62 void EnderDragonEntity::SetDataPhase(const int data_phase)
63 {
64 SetMetadata(BOTCRAFT_ENTITY_METADATA_INDEX("data_phase"), data_phase);
65 }
66
67
69 {
70 return 16.0;
71 }
72
74 {
75 return 8.0;
76 }
77
78}
virtual double GetWidthImpl() const override
static std::string GetClassName()
static constexpr int hierarchy_metadata_count
static constexpr int metadata_count
void SetDataPhase(const int data_phase)
virtual std::string GetName() const override
virtual ProtocolCraft::Json::Value Serialize() const override
virtual double GetHeightImpl() const override
virtual EntityType GetType() const override
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
Definition MobEntity.cpp:29
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