Botcraft 26.3
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 private:
11 static constexpr std::array metadata_names{
12 std::string_view("id_loyalty"),
13#if PROTOCOL_VERSION > 498 /* > 1.14.4 */
14 std::string_view("id_foil"),
15#endif
16 };
17 protected:
18 static constexpr int metadata_count = static_cast<int>(metadata_names.size());
20
21 public:
23 virtual ~ThrownTridentEntity();
24
25 // Object related stuff
26 virtual std::string GetName() const override;
27 virtual EntityType GetType() const override;
28
29 // Static stuff, for easier comparison
30 static std::string GetClassName();
31 static EntityType GetClassType();
32
33
34 virtual ProtocolCraft::Json::Value Serialize() const override;
35
36 // Metadata stuff
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 constexpr std::array metadata_names
void SetIdFoil(const bool id_foil)
virtual std::string GetName() const override
void SetIdLoyalty(const char id_loyalty)
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