Botcraft 1.21.4
Loading...
Searching...
No Matches
ZombieEntity.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace Botcraft
6{
8 {
9 protected:
10#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
11 static constexpr int metadata_count = 3;
12#elif PROTOCOL_VERSION > 340 /* > 1.12.2 */
13 static constexpr int metadata_count = 4;
14#else
15 static constexpr int metadata_count = 3;
16#endif
17 static const std::array<std::string, metadata_count> metadata_names;
19
20 public:
22 virtual ~ZombieEntity();
23
24 // Object related stuff
25 virtual std::string GetName() const override;
26 virtual EntityType GetType() const override;
27
28 // Static stuff, for easier comparison
29 static std::string GetClassName();
30 static EntityType GetClassType();
31
32
33 virtual ProtocolCraft::Json::Value Serialize() const override;
34
35 // Metadata stuff
36 virtual void SetMetadataValue(const int index, const std::any& value) override;
37
38 bool GetDataBabyId() const;
39 int GetDataSpecialTypeId() const;
40#if PROTOCOL_VERSION < 405 /* < 1.14 */
41 bool GetDataAreHandsUp() const;
42#endif
43#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
44 bool GetDataDrownedConversionId() const;
45#endif
46
47 void SetDataBabyId(const bool data_baby_id);
48 void SetDataSpecialTypeId(const int data_special_type_id);
49#if PROTOCOL_VERSION < 405 /* < 1.14 */
50 void SetDataAreHandsUp(const bool data_are_hands_up);
51#endif
52#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
53 void SetDataDrownedConversionId(const bool data_drowned_conversion_id);
54#endif
55
56 // Attribute stuff
58
59#if PROTOCOL_VERSION < 767 /* < 1.21 */
60 // b9766b59-9566-4402-bc1f-2ee2a276d836
61 static constexpr std::array<unsigned char, 16> speed_modifier_baby_key = { 0xB9, 0x76, 0x6B, 0x59, 0x95, 0x66, 0x44, 0x2, 0xBC, 0x1F, 0x2E, 0xE2, 0xA2, 0x76, 0xD8, 0x36 };
62#else
63 inline static const std::string speed_modifier_baby_key = "minecraft:baby";
64 inline static const std::string reinforcement_caller_charge_key = "minecraft:reinforcement_caller_charge";
65 inline static const std::string zombie_reinforcement_callee_charge_key = "minecraft:reinforcement_callee_charge";
66 inline static const std::string leader_zombie_bonus_key = "minecraft:leader_zombie_bonus";
67 inline static const std::string zombie_random_spawn_bonus_key = "minecraft:zombie_random_spawn_bonus";
68#endif
69
70
71 protected:
72 virtual double GetWidthImpl() const override;
73 virtual double GetHeightImpl() const override;
74
75 };
76}
static constexpr int metadata_count
static constexpr int hierarchy_metadata_count
static constexpr int hierarchy_metadata_count
static const std::string zombie_reinforcement_callee_charge_key
bool GetDataDrownedConversionId() const
static EntityType GetClassType()
static const std::string leader_zombie_bonus_key
virtual void SetMetadataValue(const int index, const std::any &value) override
static std::string GetClassName()
static const std::string speed_modifier_baby_key
virtual ProtocolCraft::Json::Value Serialize() const override
static const std::string reinforcement_caller_charge_key
virtual double GetWidthImpl() const override
int GetDataSpecialTypeId() const
virtual EntityType GetType() const override
virtual std::string GetName() const override
virtual double GetHeightImpl() const override
static const std::array< std::string, metadata_count > metadata_names
void SetDataDrownedConversionId(const bool data_drowned_conversion_id)
double GetAttributeSpawnReinforcementsChanceValue() const
static constexpr int metadata_count
static const std::string zombie_random_spawn_bonus_key
void SetDataSpecialTypeId(const int data_special_type_id)
void SetDataBabyId(const bool data_baby_id)
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45