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