Botcraft
1.21.4
Loading...
Searching...
No Matches
ShulkerEntity.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
botcraft/Game/Entities/entities/animal/AbstractGolemEntity.hpp
"
4
5
namespace
Botcraft
6
{
7
class
ShulkerEntity
:
public
AbstractGolemEntity
8
{
9
protected
:
10
#if PROTOCOL_VERSION > 754
/* > 1.16.5 */
11
static
constexpr
int
metadata_count
= 3;
12
#else
13
static
constexpr
int
metadata_count
= 4;
14
#endif
15
static
const
std::array<std::string, metadata_count>
metadata_names
;
16
static
constexpr
int
hierarchy_metadata_count
=
AbstractGolemEntity::metadata_count
+
AbstractGolemEntity::hierarchy_metadata_count
;
17
18
public
:
19
ShulkerEntity
();
20
virtual
~ShulkerEntity
();
21
22
// Object related stuff
23
virtual
std::string
GetName
()
const override
;
24
virtual
EntityType
GetType
()
const override
;
25
26
// Static stuff, for easier comparison
27
static
std::string
GetClassName
();
28
static
EntityType
GetClassType
();
29
30
31
virtual
ProtocolCraft::Json::Value
Serialize
()
const override
;
32
33
// Metadata stuff
34
virtual
void
SetMetadataValue
(
const
int
index,
const
std::any& value)
override
;
35
36
Direction
GetDataAttachFaceId
()
const
;
37
#if PROTOCOL_VERSION < 755
/* < 1.17 */
38
std::optional<Position> GetDataAttachPosId()
const
;
39
#endif
40
char
GetDataPeekId
()
const
;
41
char
GetDataColorId
()
const
;
42
43
void
SetDataAttachFaceId
(
const
Direction
data_attach_face_id);
44
#if PROTOCOL_VERSION < 755
/* < 1.17 */
45
void
SetDataAttachPosId(
const
std::optional<Position>& data_attach_pos_id);
46
#endif
47
void
SetDataPeekId
(
const
char
data_peek_id);
48
void
SetDataColorId
(
const
char
data_color_id);
49
50
// Attribute stuff
51
#if PROTOCOL_VERSION < 767
/* < 1.21 */
52
// 7e0292f2-9434-48d5-a29f-9583af7df27f
53
static
constexpr
std::array<unsigned char, 16>
covered_armor_modifier_key
= { 0x7E, 0x2, 0x92, 0xF2, 0x94, 0x34, 0x48, 0xD5, 0xA2, 0x9F, 0x95, 0x83, 0xAF, 0x7D, 0xF2, 0x7F };
54
#else
55
inline
static
const
std::string
covered_armor_modifier_key
=
"minecraft:covered"
;
56
#endif
57
58
59
protected
:
60
virtual
double
GetWidthImpl
()
const override
;
61
virtual
double
GetHeightImpl
()
const override
;
62
63
};
64
}
AbstractGolemEntity.hpp
Botcraft::AbstractGolemEntity
Definition
AbstractGolemEntity.hpp:8
Botcraft::AbstractGolemEntity::metadata_count
static constexpr int metadata_count
Definition
AbstractGolemEntity.hpp:10
Botcraft::AbstractGolemEntity::hierarchy_metadata_count
static constexpr int hierarchy_metadata_count
Definition
AbstractGolemEntity.hpp:11
Botcraft::ShulkerEntity
Definition
ShulkerEntity.hpp:8
Botcraft::ShulkerEntity::GetDataPeekId
char GetDataPeekId() const
Definition
ShulkerEntity.cpp:100
Botcraft::ShulkerEntity::SetDataPeekId
void SetDataPeekId(const char data_peek_id)
Definition
ShulkerEntity.cpp:127
Botcraft::ShulkerEntity::metadata_names
static const std::array< std::string, metadata_count > metadata_names
Definition
ShulkerEntity.hpp:15
Botcraft::ShulkerEntity::GetName
virtual std::string GetName() const override
Definition
ShulkerEntity.cpp:36
Botcraft::ShulkerEntity::GetClassType
static EntityType GetClassType()
Definition
ShulkerEntity.cpp:52
Botcraft::ShulkerEntity::GetDataAttachFaceId
Direction GetDataAttachFaceId() const
Definition
ShulkerEntity.cpp:86
Botcraft::ShulkerEntity::ShulkerEntity
ShulkerEntity()
Definition
ShulkerEntity.cpp:16
Botcraft::ShulkerEntity::~ShulkerEntity
virtual ~ShulkerEntity()
Definition
ShulkerEntity.cpp:30
Botcraft::ShulkerEntity::GetHeightImpl
virtual double GetHeightImpl() const override
Definition
ShulkerEntity.cpp:145
Botcraft::ShulkerEntity::GetType
virtual EntityType GetType() const override
Definition
ShulkerEntity.cpp:41
Botcraft::ShulkerEntity::metadata_count
static constexpr int metadata_count
Definition
ShulkerEntity.hpp:11
Botcraft::ShulkerEntity::GetClassName
static std::string GetClassName()
Definition
ShulkerEntity.cpp:47
Botcraft::ShulkerEntity::hierarchy_metadata_count
static constexpr int hierarchy_metadata_count
Definition
ShulkerEntity.hpp:16
Botcraft::ShulkerEntity::covered_armor_modifier_key
static const std::string covered_armor_modifier_key
Definition
ShulkerEntity.hpp:55
Botcraft::ShulkerEntity::SetMetadataValue
virtual void SetMetadataValue(const int index, const std::any &value) override
Definition
ShulkerEntity.cpp:73
Botcraft::ShulkerEntity::GetWidthImpl
virtual double GetWidthImpl() const override
Definition
ShulkerEntity.cpp:140
Botcraft::ShulkerEntity::SetDataAttachFaceId
void SetDataAttachFaceId(const Direction data_attach_face_id)
Definition
ShulkerEntity.cpp:113
Botcraft::ShulkerEntity::Serialize
virtual ProtocolCraft::Json::Value Serialize() const override
Definition
ShulkerEntity.cpp:58
Botcraft::ShulkerEntity::GetDataColorId
char GetDataColorId() const
Definition
ShulkerEntity.cpp:106
Botcraft::ShulkerEntity::SetDataColorId
void SetDataColorId(const char data_color_id)
Definition
ShulkerEntity.cpp:133
ProtocolCraft::Json::Value
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition
Json.hpp:45
Botcraft
Definition
BaseNode.hpp:6
Botcraft::Direction
Direction
Definition
Enums.hpp:197
Botcraft::EntityType
EntityType
Definition
Entity.hpp:280
botcraft
include
botcraft
Game
Entities
entities
monster
ShulkerEntity.hpp
Generated by
1.9.8