Botcraft 1.21.5
Loading...
Searching...
No Matches
MushroomCowEntity.hpp
Go to the documentation of this file.
1#pragma once
2
3#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
5#else
7#endif
8
9namespace Botcraft
10{
11#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
12 class MushroomCowEntity : public CowEntity
13#else
15#endif
16 {
17 protected:
18#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
19 static constexpr int metadata_count = 1;
20 static const std::array<std::string, metadata_count> metadata_names;
21#else
22 static constexpr int metadata_count = 0;
23#endif
24#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
26#else
28#endif
29
30 public:
32 virtual ~MushroomCowEntity();
33
34 // Object related stuff
35 virtual std::string GetName() const override;
36 virtual EntityType GetType() const override;
37
38 // Static stuff, for easier comparison
39 static std::string GetClassName();
40 static EntityType GetClassType();
41
42
43#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
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 std::string GetDataType() const;
51
52 void SetDataType(const std::string& data_type);
53#else
54 int GetDataType() const;
55
56 void SetDataType(const int data_type);
57#endif
58#endif
59
60 protected:
61 virtual double GetWidthImpl() const override;
62 virtual double GetHeightImpl() const override;
63
64 };
65}
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
static constexpr int metadata_count
Definition CowEntity.hpp:22
static constexpr int hierarchy_metadata_count
Definition CowEntity.hpp:24
virtual double GetWidthImpl() const override
virtual EntityType GetType() const override
void SetDataType(const int data_type)
virtual double GetHeightImpl() const override
virtual std::string GetName() const override
static constexpr int hierarchy_metadata_count
static std::string GetClassName()
static const std::array< std::string, metadata_count > metadata_names
virtual void SetMetadataValue(const int index, const std::any &value) override
static constexpr int metadata_count
virtual ProtocolCraft::Json::Value Serialize() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45