Botcraft 26.3
Loading...
Searching...
No Matches
ArmadilloEntity.cpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
3
4namespace Botcraft
5{
7 {
8 // Initialize all metadata with default values
11
12 // Initialize all attributes with default values
15 }
16
21
22
23 std::string ArmadilloEntity::GetName() const
24 {
25 return "armadillo";
26 }
27
32
33
35 {
36 return "armadillo";
37 }
38
43
44
46 {
48
49 output["metadata"]["armadillo_state"] = GetArmadilloState();
50
51 return output;
52 }
53
54
56 {
57 return GetMetadata<int>(BOTCRAFT_ENTITY_METADATA_INDEX("armadillo_state"));
58 }
59
60
61 void ArmadilloEntity::SetArmadilloState(const int armadillo_state)
62 {
63 SetMetadata(BOTCRAFT_ENTITY_METADATA_INDEX("armadillo_state"), armadillo_state);
64 }
65
66
68 {
69 return 0.7;
70 }
71
73 {
74 return 0.65;
75 }
76
77}
78#endif
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
virtual double GetHeightImpl() const override
virtual double GetWidthImpl() const override
static EntityType GetClassType()
static std::string GetClassName()
void SetArmadilloState(const int armadillo_state)
virtual EntityType GetType() const override
virtual ProtocolCraft::Json::Value Serialize() const override
virtual std::string GetName() 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
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