Botcraft 26.3
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 private:
18#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
19 static constexpr std::array metadata_names{
20 std::string_view("data_type"),
21 };
22#endif
23 protected:
24#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
25 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
26#else
27 static constexpr int metadata_count = 0;
28#endif
29#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
31#else
33#endif
34
35 public:
37 virtual ~MushroomCowEntity();
38
39 // Object related stuff
40 virtual std::string GetName() const override;
41 virtual EntityType GetType() const override;
42
43 // Static stuff, for easier comparison
44 static std::string GetClassName();
45 static EntityType GetClassType();
46
47
48#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
49 virtual ProtocolCraft::Json::Value Serialize() const override;
50
51 // Metadata stuff
52#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
53 std::string GetDataType() const;
54
55 void SetDataType(const std::string& data_type);
56#else
57 int GetDataType() const;
58
59 void SetDataType(const int data_type);
60#endif
61#endif
62
63 protected:
64 virtual double GetWidthImpl() const override;
65 virtual double GetHeightImpl() const override;
66
67 };
68}
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
static constexpr int metadata_count
Definition CowEntity.hpp:31
static constexpr int hierarchy_metadata_count
Definition CowEntity.hpp:32
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 constexpr std::array metadata_names
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