Botcraft 1.21.4
Loading...
Searching...
No Matches
AnimalEntity.cpp
Go to the documentation of this file.
2
3#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
4#include <mutex>
5#endif
6
7namespace Botcraft
8{
10 {
11 // Initialize all attributes with default values
12#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
14#endif
15
16 }
17
22
24 {
25 return true;
26 }
27
28#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
30 {
32
33 output["attributes"]["tempt_range"] = GetAttributeTemptRangeValue();
34
35 return output;
36 }
37#endif
38
39
40#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
42 {
43 std::shared_lock<std::shared_mutex> lock(entity_mutex);
45 }
46#endif
47
48}
virtual ProtocolCraft::Json::Value Serialize() const override
double GetAttributeTemptRangeValue() const
virtual bool IsAnimal() const override
virtual ProtocolCraft::Json::Value Serialize() const override
std::shared_mutex entity_mutex
Definition Entity.hpp:253
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