Botcraft 26.3
Loading...
Searching...
No Matches
AbstractNautilusEntity.cpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 773 /* > 1.21.10 */
3
4namespace Botcraft
5{
18
23
25 {
26 return true;
27 }
28
29
31 {
33
34 output["metadata"]["data_dash"] = GetDataDash();
35
36 output["attributes"]["attack_damage"] = GetAttributeAttackDamageValue();
37
38 return output;
39 }
40
41
43 {
44 return GetMetadata<bool>(BOTCRAFT_ENTITY_METADATA_INDEX("data_dash"));
45 }
46
47
48 void AbstractNautilusEntity::SetDataDash(const bool data_dash)
49 {
50 SetMetadata(BOTCRAFT_ENTITY_METADATA_INDEX("data_dash"), data_dash);
51 }
52
53
55 {
56 std::shared_lock<std::shared_mutex> lock(entity_mutex);
58 }
59
60}
61#endif
virtual ProtocolCraft::Json::Value Serialize() const override
virtual bool IsAbstractNautilus() const override
void SetMetadata(const int index, const std::any &value)
Definition Entity.cpp:366
std::shared_mutex entity_mutex
Definition Entity.hpp:320
std::vector< std::any > metadata
Definition Entity.hpp:335
std::map< EntityAttribute::Type, EntityAttribute > attributes
virtual ProtocolCraft::Json::Value Serialize() const override
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