Botcraft 1.21.4
Loading...
Searching...
No Matches
ThrownTridentEntity.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
2#pragma once
3
5
6namespace Botcraft
7{
9 {
10 protected:
11#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
12 static constexpr int metadata_count = 2;
13#else
14 static constexpr int metadata_count = 1;
15#endif
16 static const std::array<std::string, metadata_count> metadata_names;
18
19 public:
21 virtual ~ThrownTridentEntity();
22
23 // Object related stuff
24 virtual std::string GetName() const override;
25 virtual EntityType GetType() const override;
26
27 // Static stuff, for easier comparison
28 static std::string GetClassName();
29 static EntityType GetClassType();
30
31
32 virtual ProtocolCraft::Json::Value Serialize() const override;
33
34 // Metadata stuff
35 virtual void SetMetadataValue(const int index, const std::any& value) override;
36
37 char GetIdLoyalty() const;
38#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
39 bool GetIdFoil() const;
40#endif
41
42 void SetIdLoyalty(const char id_loyalty);
43#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
44 void SetIdFoil(const bool id_foil);
45#endif
46
47 protected:
48 virtual double GetWidthImpl() const override;
49 virtual double GetHeightImpl() const override;
50
51 };
52}
53#endif
static constexpr int hierarchy_metadata_count
static const std::array< std::string, metadata_count > metadata_names
void SetIdFoil(const bool id_foil)
virtual std::string GetName() const override
void SetIdLoyalty(const char id_loyalty)
virtual void SetMetadataValue(const int index, const std::any &value) override
virtual double GetHeightImpl() const override
virtual double GetWidthImpl() const override
virtual EntityType GetType() const override
static constexpr int hierarchy_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