Botcraft 26.3
Loading...
Searching...
No Matches
CopperGolemEntity.cpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 772 /* > 1.21.8 */
3
4namespace Botcraft
5{
17
22
23
24 std::string CopperGolemEntity::GetName() const
25 {
26 return "copper_golem";
27 }
28
33
34
36 {
37 return "copper_golem";
38 }
39
44
45
47 {
49
50 output["metadata"]["copper_golem_state"] = GetCopperGolemState();
51
52 return output;
53 }
54
55
57 {
58 return GetMetadata<int>(BOTCRAFT_ENTITY_METADATA_INDEX("copper_golem_state"));
59 }
60
61
62 void CopperGolemEntity::SetCopperGolemState(const int copper_golem_state)
63 {
64 SetMetadata(BOTCRAFT_ENTITY_METADATA_INDEX("copper_golem_state"), copper_golem_state);
65 }
66
67
69 {
70 return 0.49;
71 }
72
74 {
75 return 0.98;
76 }
77
78}
79#endif
static constexpr int metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
virtual std::string GetName() const override
static std::string GetClassName()
virtual EntityType GetType() const override
void SetCopperGolemState(const int copper_golem_state)
virtual double GetWidthImpl() const override
static constexpr int hierarchy_metadata_count
virtual double GetHeightImpl() const override
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
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