Botcraft 26.3
Loading...
Searching...
No Matches
DisplayBlockDisplayEntity.cpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 761 /* > 1.19.3 */
3
4namespace Botcraft
5{
7 {
8 // Initialize all metadata with default values
11 }
12
17
18
20 {
21 return "block_display";
22 }
23
28
29
31 {
32 return "block_display";
33 }
34
39
40
41
43 {
45
46 output["metadata"]["data_block_state_id"] = GetDataBlockStateId();
47
48 return output;
49 }
50
51
53 {
54 return GetMetadata<int>(BOTCRAFT_ENTITY_METADATA_INDEX("data_block_state_id"));
55 }
56
57
58 void DisplayBlockDisplayEntity::SetDataBlockStateId(const int data_block_state_id)
59 {
60 SetMetadata(BOTCRAFT_ENTITY_METADATA_INDEX("data_block_state_id"), data_block_state_id);
61 }
62
64 {
65 return 0.0;
66 }
67
69 {
70 return 0.0;
71 }
72
73}
74#endif
virtual EntityType GetType() const override
virtual ProtocolCraft::Json::Value Serialize() const override
void SetDataBlockStateId(const int data_block_state_id)
virtual std::string GetName() const override
virtual double GetWidthImpl() const override
virtual double GetHeightImpl() const override
virtual ProtocolCraft::Json::Value Serialize() const override
void SetMetadata(const int index, const std::any &value)
Definition Entity.cpp:366
std::vector< std::any > metadata
Definition Entity.hpp:335
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45
#define BOTCRAFT_ENTITY_METADATA_INDEX(name)
Definition Entity.hpp:347