Botcraft 26.3
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 private:
18 static constexpr std::array metadata_names{
19 std::string_view("data_is_charging"),
20 };
21 protected:
22 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
23#if PROTOCOL_VERSION < 771 /* < 1.21.6 */
24 static constexpr int hierarchy_metadata_count = FlyingMobEntity::metadata_count + FlyingMobEntity::hierarchy_metadata_count;
25#else
27#endif
28
29 public:
31 virtual ~GhastEntity();
32
33 // Object related stuff
34 virtual std::string GetName() const override;
35 virtual EntityType GetType() const override;
36
37 // Static stuff, for easier comparison
38 static std::string GetClassName();
39 static EntityType GetClassType();
40
41
42 virtual ProtocolCraft::Json::Value Serialize() const override;
43
44 // Metadata stuff
45 bool GetDataIsCharging() const;
46
47 void SetDataIsCharging(const bool data_is_charging);
48
49
50#if PROTOCOL_VERSION > 770 /* > 1.21.5 */
51 // Attribute stuff
52 double GetAttributeFlyingSpeedValue() const;
53#endif
54
55 protected:
56 virtual double GetWidthImpl() const override;
57 virtual double GetHeightImpl() const override;
58
59 };
60}
static constexpr int metadata_count
bool GetDataIsCharging() const
virtual double GetHeightImpl() const 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)
static constexpr std::array metadata_names
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr int hierarchy_metadata_count
Definition MobEntity.hpp:15
static constexpr int metadata_count
Definition MobEntity.hpp:14
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45