Botcraft 1.21.5
Loading...
Searching...
No Matches
DolphinEntity.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
2#pragma once
3
4#if PROTOCOL_VERSION < 768 /* < 1.21.2 */
6#else
8#endif
9
10namespace Botcraft
11{
12#if PROTOCOL_VERSION < 768 /* < 1.21.2 */
13 class DolphinEntity : public WaterAnimalEntity
14#else
16#endif
17 {
18 protected:
19#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
20 static constexpr int metadata_count = 3;
21#else
22 static constexpr int metadata_count = 2;
23#endif
24 static const std::array<std::string, metadata_count> metadata_names;
25#if PROTOCOL_VERSION < 768 /* < 1.21.2 */
27#else
29#endif
30
31 public:
33 virtual ~DolphinEntity();
34
35 // Object related stuff
36 virtual std::string GetName() const override;
37 virtual EntityType GetType() const override;
38
39 // Static stuff, for easier comparison
40 static std::string GetClassName();
41 static EntityType GetClassType();
42
43
44 virtual ProtocolCraft::Json::Value Serialize() const override;
45
46 // Metadata stuff
47 virtual void SetMetadataValue(const int index, const std::any& value) override;
48
49#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
50 Position GetTreasurePos() const;
51#endif
52 bool GetGotFish() const;
53 int GetMoistnessLevel() const;
54
55#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
56 void SetTreasurePos(const Position& treasure_pos);
57#endif
58 void SetGotFish(const bool got_fish);
59 void SetMoistnessLevel(const int moistness_level);
60
61 // Attribute stuff
62 double GetAttributeAttackDamageValue() const;
63
64 protected:
65 virtual double GetWidthImpl() const override;
66 virtual double GetHeightImpl() const override;
67
68 };
69}
70#endif
static const std::array< std::string, metadata_count > metadata_names
virtual EntityType GetType() const override
double GetAttributeAttackDamageValue() const
virtual std::string GetName() const override
static constexpr int metadata_count
virtual double GetWidthImpl() const override
static EntityType GetClassType()
virtual double GetHeightImpl() const override
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr int hierarchy_metadata_count
void SetMoistnessLevel(const int moistness_level)
void SetGotFish(const bool got_fish)
virtual void SetMetadataValue(const int index, const std::any &value) override
static std::string GetClassName()
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45