Botcraft 1.21.8
Loading...
Searching...
No Matches
GhastEntity.hpp
Go to the documentation of this file.
1#pragma once
2
3#if PROTOCOL_VERSION < 771 /* < 1.21.6 */
5#else
7#endif
8
9namespace Botcraft
10{
11#if PROTOCOL_VERSION < 771 /* < 1.21.6 */
12 class GhastEntity : public FlyingMobEntity
13#else
14 class GhastEntity : public MobEntity
15#endif
16 {
17 protected:
18 static constexpr int metadata_count = 1;
19 static const std::array<std::string, metadata_count> metadata_names;
20#if PROTOCOL_VERSION < 771 /* < 1.21.6 */
21 static constexpr int hierarchy_metadata_count = FlyingMobEntity::metadata_count + FlyingMobEntity::hierarchy_metadata_count;
22#else
24#endif
25
26 public:
28 virtual ~GhastEntity();
29
30 // Object related stuff
31 virtual std::string GetName() const override;
32 virtual EntityType GetType() const override;
33
34 // Static stuff, for easier comparison
35 static std::string GetClassName();
36 static EntityType GetClassType();
37
38
39 virtual ProtocolCraft::Json::Value Serialize() const override;
40
41 // Metadata stuff
42 virtual void SetMetadataValue(const int index, const std::any& value) override;
43
44 bool GetDataIsCharging() const;
45
46 void SetDataIsCharging(const bool data_is_charging);
47
48
49#if PROTOCOL_VERSION > 770 /* > 1.21.5 */
50 // Attribute stuff
51 double GetAttributeFlyingSpeedValue() const;
52#endif
53
54 protected:
55 virtual double GetWidthImpl() const override;
56 virtual double GetHeightImpl() const override;
57
58 };
59}
static constexpr int metadata_count
bool GetDataIsCharging() const
virtual double GetHeightImpl() const override
static const std::array< std::string, metadata_count > metadata_names
virtual void SetMetadataValue(const int index, const std::any &value) override
static EntityType GetClassType()
virtual double GetWidthImpl() const override
static constexpr int hierarchy_metadata_count
static std::string GetClassName()
virtual EntityType GetType() const override
virtual std::string GetName() const override
double GetAttributeFlyingSpeedValue() const
void SetDataIsCharging(const bool data_is_charging)
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr int hierarchy_metadata_count
Definition MobEntity.hpp:12
static constexpr int metadata_count
Definition MobEntity.hpp:10
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45