Botcraft 1.21.4
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 static constexpr int metadata_count = 3;
20 static const std::array<std::string, metadata_count> metadata_names;
21#if PROTOCOL_VERSION < 768 /* < 1.21.2 */
23#else
25#endif
26
27 public:
29 virtual ~DolphinEntity();
30
31 // Object related stuff
32 virtual std::string GetName() const override;
33 virtual EntityType GetType() const override;
34
35 // Static stuff, for easier comparison
36 static std::string GetClassName();
37 static EntityType GetClassType();
38
39
40 virtual ProtocolCraft::Json::Value Serialize() const override;
41
42 // Metadata stuff
43 virtual void SetMetadataValue(const int index, const std::any& value) override;
44
46 bool GetGotFish() const;
47 int GetMoistnessLevel() const;
48
49 void SetTreasurePos(const Position& treasure_pos);
50 void SetGotFish(const bool got_fish);
51 void SetMoistnessLevel(const int moistness_level);
52
53 // Attribute stuff
54 double GetAttributeAttackDamageValue() const;
55
56 protected:
57 virtual double GetWidthImpl() const override;
58 virtual double GetHeightImpl() const override;
59
60 };
61}
62#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)
void SetTreasurePos(const Position &treasure_pos)
virtual void SetMetadataValue(const int index, const std::any &value) override
static std::string GetClassName()
Position GetTreasurePos() const
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