Botcraft 26.2
Loading...
Searching...
No Matches
SlimeEntity.hpp
Go to the documentation of this file.
1#pragma once
2
3#if PROTOCOL_VERSION < 776 /* < 26.2 */
5#else
7#endif
8
9namespace Botcraft
10{
11#if PROTOCOL_VERSION < 776 /* < 26.2 */
12 class SlimeEntity : public MobEntity
13#else
15#endif
16 {
17 protected:
18#if PROTOCOL_VERSION < 776 /* < 26.2 */
19 static constexpr int metadata_count = 1;
20 static const std::array<std::string, metadata_count> metadata_names;
22#else
23 static constexpr int metadata_count = 0;
25#endif
26
27 public:
29 virtual ~SlimeEntity();
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#if PROTOCOL_VERSION < 776 /* < 26.2 */
41 virtual ProtocolCraft::Json::Value Serialize() const override;
42
43 // Metadata stuff
44 virtual void SetMetadataValue(const int index, const std::any& value) override;
45
46 int GetIdSize() const;
47
48 void SetIdSize(const int id_size);
49
50 protected:
51 int GetIdSizeImpl() const;
52 void SizeChanged(const int new_size);
53#else
54 protected:
55 virtual void SizeChanged(const int new_size) override;
56#endif
57
58 protected:
59 virtual double GetWidthImpl() const override;
60 virtual double GetHeightImpl() const override;
61 };
62}
static const std::array< std::string, metadata_count > metadata_names
virtual ProtocolCraft::Json::Value Serialize() const override
virtual void SetMetadataValue(const int index, const std::any &value) override
static constexpr int hierarchy_metadata_count
Definition MobEntity.hpp:12
static constexpr int metadata_count
Definition MobEntity.hpp:10
virtual double GetHeightImpl() const override
static constexpr int hierarchy_metadata_count
static std::string GetClassName()
virtual void SizeChanged(const int new_size) override
static EntityType GetClassType()
static constexpr int metadata_count
virtual std::string GetName() const override
virtual EntityType GetType() const override
virtual double GetWidthImpl() const override
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45