Botcraft 26.3
Loading...
Searching...
No Matches
MinecartFurnaceEntity.cpp
Go to the documentation of this file.
2
3namespace Botcraft
4{
6 {
7 // Initialize all metadata with default values
9 SetDataIdFuel(false);
10 }
11
16
17
19 {
20 return "furnace_minecart";
21 }
22
27
28
30 {
31 return "furnace_minecart";
32 }
33
38
39
41 {
43
44 output["metadata"]["data_id_fuel"] = GetDataIdFuel();
45
46 return output;
47 }
48
49
51 {
52 return GetMetadata<bool>(BOTCRAFT_ENTITY_METADATA_INDEX("data_id_fuel"));
53 }
54
55
56 void MinecartFurnaceEntity::SetDataIdFuel(const bool data_id_fuel)
57 {
58 SetMetadata(BOTCRAFT_ENTITY_METADATA_INDEX("data_id_fuel"), data_id_fuel);
59 }
60
61
63 {
64 return 0.98;
65 }
66
68 {
69 return 0.7;
70 }
71
72}
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
virtual double GetHeightImpl() const override
virtual std::string GetName() const override
virtual double GetWidthImpl() const override
virtual ProtocolCraft::Json::Value Serialize() const override
virtual EntityType GetType() const override
void SetDataIdFuel(const bool data_id_fuel)
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