3#if PROTOCOL_VERSION > 765
12 "data_id_fireworks_item",
13 "data_attached_to_target",
14#if PROTOCOL_VERSION > 404
22#if PROTOCOL_VERSION < 766
27 default_slot.SetItemId(item_id);
28 default_slot.SetItemCount(1);
32#if PROTOCOL_VERSION > 404
48 return "firework_rocket";
59 return "firework_rocket";
70#if PROTOCOL_VERSION > 578
77#if PROTOCOL_VERSION > 404
92#if PROTOCOL_VERSION > 578
108 return std::any_cast<ProtocolCraft::Slot>(
metadata.at(
"data_id_fireworks_item"));
111#if PROTOCOL_VERSION > 404
115 return std::any_cast<std::optional<int>>(
metadata.at(
"data_attached_to_target"));
121 return std::any_cast<bool>(
metadata.at(
"data_shot_at_angle"));
127 return std::any_cast<int>(
metadata.at(
"data_attached_to_target"));
135 metadata[
"data_id_fireworks_item"] = data_id_fireworks_item;
138#if PROTOCOL_VERSION > 404
142 metadata[
"data_attached_to_target"] = data_attached_to_target;
148 metadata[
"data_shot_at_angle"] = data_shot_at_angle;
154 metadata[
"data_attached_to_target"] = data_attached_to_target;
static AssetsManager & getInstance()
ItemId GetItemID(const std::string &item_name) const
virtual ProtocolCraft::Json::Value Serialize() const
virtual void SetMetadataValue(const int index, const std::any &value)
std::shared_mutex entity_mutex
std::map< std::string, std::any > metadata
static std::string GetClassName()
virtual double GetHeightImpl() const override
ProtocolCraft::Slot GetDataIdFireworksItem() const
virtual ProtocolCraft::Json::Value Serialize() const override
std::optional< int > GetDataAttachedToTarget() const
bool GetDataShotAtAngle() const
virtual double GetWidthImpl() const override
void SetDataShotAtAngle(const bool data_shot_at_angle)
static constexpr int metadata_count
virtual ~FireworkRocketEntity()
virtual void SetMetadataValue(const int index, const std::any &value) override
static EntityType GetClassType()
virtual std::string GetName() const override
void SetDataIdFireworksItem(const ProtocolCraft::Slot &data_id_fireworks_item)
virtual EntityType GetType() const override
void SetDataAttachedToTarget(const std::optional< int > &data_attached_to_target)
static constexpr int hierarchy_metadata_count
static const std::array< std::string, metadata_count > metadata_names
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
virtual Json::Value Serialize() const