8 "data_player_absorption_id",
10#if PROTOCOL_VERSION < 773
11 "data_player_mode_customisation",
12 "data_player_main_hand",
14 "data_shoulder_right",
16 "data_shoulder_parrot_left",
17 "data_shoulder_parrot_right",
26#if PROTOCOL_VERSION < 773
41#if PROTOCOL_VERSION > 765
46#if PROTOCOL_VERSION > 766
52#if PROTOCOL_VERSION > 770
74#if PROTOCOL_VERSION > 404
136#if PROTOCOL_VERSION < 773
139 output[
"metadata"][
"data_shoulder_left"] = GetDataShoulderLeft().Serialize();
140 output[
"metadata"][
"data_shoulder_right"] = GetDataShoulderRight().Serialize();
149#if PROTOCOL_VERSION > 765
154#if PROTOCOL_VERSION > 766
160#if PROTOCOL_VERSION > 770
172#if PROTOCOL_VERSION < 773
188 return std::any_cast<float>(
metadata.at(
"data_player_absorption_id"));
194 return std::any_cast<int>(
metadata.at(
"data_score_id"));
197#if PROTOCOL_VERSION < 773
201 return std::any_cast<char>(
metadata.at(
"data_player_mode_customisation"));
207 return std::any_cast<char>(
metadata.at(
"data_player_main_hand"));
213 return std::any_cast<ProtocolCraft::NBT::Value>(
metadata.at(
"data_shoulder_left"));
219 return std::any_cast<ProtocolCraft::NBT::Value>(
metadata.at(
"data_shoulder_right"));
225 return std::any_cast<const std::optional<int>&>(
metadata.at(
"data_shoulder_parrot_left"));
231 return std::any_cast<const std::optional<int>&>(
metadata.at(
"data_shoulder_parrot_right"));
239 metadata[
"data_player_absorption_id"] = data_player_absorption_id;
245 metadata[
"data_score_id"] = data_score_id;
248#if PROTOCOL_VERSION < 773
252 metadata[
"data_player_mode_customisation"] = data_player_mode_customisation;
258 metadata[
"data_player_main_hand"] = data_player_main_hand;
264 metadata[
"data_shoulder_left"] = data_shoulder_left;
270 metadata[
"data_shoulder_right"] = data_shoulder_right;
276 metadata[
"data_shoulder_parrot_left"] = data_shoulder_parrot_left;
282 metadata[
"data_shoulder_parrot_right"] = data_shoulder_parrot_right;
310#if PROTOCOL_VERSION > 765
330#if PROTOCOL_VERSION > 766
361#if PROTOCOL_VERSION > 770
372#if PROTOCOL_VERSION > 404
391#if PROTOCOL_VERSION > 404
400#if PROTOCOL_VERSION > 404
407#if PROTOCOL_VERSION > 404
410 const double half_width =
GetWidth(pose) / 2.0;
411 const double half_height =
GetHeight(pose) / 2.0;
char GetDataPlayerModeCustomisation() const
void SetDataPlayerMainHand(const char data_player_main_hand)
void SetDataPlayerModeCustomisation(const char data_player_mode_customisation)
char GetDataPlayerMainHand() const
virtual void SetMetadataValue(const int index, const std::any &value) override
@ PlayerSubmergedMiningSpeed
@ PlayerEntityInteractionRange
@ PlayerBlockInteractionRange
@ PlayerSweepingDamageRatio
std::shared_mutex entity_mutex
Pose GetDataPoseImpl() const
std::map< std::string, std::any > metadata
Vector3< double > position
std::map< EntityAttribute::Type, EntityAttribute > attributes
virtual ProtocolCraft::Json::Value Serialize() const override
virtual void SetMetadataValue(const int index, const std::any &value) override
double GetAttributePlayerBlockBreakSpeedValue() const
virtual void SetMetadataValue(const int index, const std::any &value) override
double GetAttributeAttackSpeedValue() const
int GetDataScoreId() const
void SetDataPlayerAbsorptionId(const float data_player_absorption_id)
virtual double GetWidthImpl() const override
double GetAttributePlayerSweepingDamageRatioValue() const
static constexpr int hierarchy_metadata_count
void SetDataShoulderParrotLeft(const std::optional< int > &data_shoulder_parrot_left)
virtual double GetHeightImpl() const override
float GetDataPlayerAbsorptionId() const
void SetDataShoulderParrotRight(const std::optional< int > &data_shoulder_parrot_right)
virtual std::string GetName() const override
Get the name of this entity TYPE as a string. For player name see NetworkManager::GetMyName()
virtual EntityType GetType() const override
double GetAttributeLuckValue() const
double GetAttributePlayerSneakingSpeedValueImpl() const
const std::optional< int > & GetDataShoulderParrotRight() const
double GetAttributePlayerBlockInteractionRangeValue() const
virtual ProtocolCraft::Json::Value Serialize() const override
virtual bool IsRemotePlayer() const override
double GetAttributePlayerEntityInteractionRangeValue() const
static constexpr int metadata_count
AABB GetColliderImpl() const
static EntityType GetClassType()
void SetDataScoreId(const int data_score_id)
double GetAttributePlayerSubmergedMiningSpeedValue() const
static std::string GetClassName()
const std::optional< int > & GetDataShoulderParrotLeft() const
double GetEyeHeight() const
virtual double GetEyeHeightImpl() const
double GetAttributePlayerMiningEfficiencyValue() const
static const std::array< std::string, metadata_count > metadata_names
double GetAttributePlayerSneakingSpeedValue() const
double GetAttributeAttackDamageValue() const
double GetAttributeWaypointReceiveRangeValue() const
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...