Botcraft 1.21.5
Loading...
Searching...
No Matches
ThrownPotionEntity.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION < 770 /* < 1.21.5 */
2#pragma once
3
4#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
6#else
9#endif
10
11namespace Botcraft
12{
13#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
14 class ThrownPotionEntity : public ThrowableItemProjectileEntity
15#else
16 class ThrownPotionEntity : public ThrowableProjectileEntity
17#endif
18 {
19 protected:
20#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
21 static constexpr int metadata_count = 0;
22 static constexpr int hierarchy_metadata_count = ThrowableItemProjectileEntity::metadata_count + ThrowableItemProjectileEntity::hierarchy_metadata_count;
23#else
24 static constexpr int metadata_count = 1;
25 static const std::array<std::string, metadata_count> metadata_names;
26 static constexpr int hierarchy_metadata_count = ThrowableProjectileEntity::metadata_count + ThrowableProjectileEntity::hierarchy_metadata_count;
27#endif
28 public:
29 ThrownPotionEntity();
30 virtual ~ThrownPotionEntity();
31
32 // Object related stuff
33 virtual std::string GetName() const override;
34 virtual EntityType GetType() const override;
35
36 // Static stuff, for easier comparison
37 static std::string GetClassName();
38 static EntityType GetClassType();
39
40
41#if PROTOCOL_VERSION < 579 /* < 1.16 */
42 virtual ProtocolCraft::Json::Value Serialize() const override;
43
44 // Metadata stuff
45 virtual void SetMetadataValue(const int index, const std::any& value) override;
46
47 ProtocolCraft::Slot GetDataItemStack() const;
48
49 void SetDataItemStack(const ProtocolCraft::Slot& data_item_stack);
50#endif
51
52 protected:
53 virtual double GetWidthImpl() const override;
54 virtual double GetHeightImpl() const override;
55
56 };
57}
58#endif
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45