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
43#if PROTOCOL_VERSION < 775
48#if PROTOCOL_VERSION > 766
54#if PROTOCOL_VERSION > 770
76#if PROTOCOL_VERSION > 404
138#if PROTOCOL_VERSION < 773
141 output[
"metadata"][
"data_shoulder_left"] = GetDataShoulderLeft().Serialize();
142 output[
"metadata"][
"data_shoulder_right"] = GetDataShoulderRight().Serialize();
151#if PROTOCOL_VERSION > 765
153#if PROTOCOL_VERSION < 775
158#if PROTOCOL_VERSION > 766
164#if PROTOCOL_VERSION > 770
176#if PROTOCOL_VERSION < 773
192 return std::any_cast<float>(
metadata.at(
"data_player_absorption_id"));
198 return std::any_cast<int>(
metadata.at(
"data_score_id"));
201#if PROTOCOL_VERSION < 773
205 return std::any_cast<char>(
metadata.at(
"data_player_mode_customisation"));
211 return std::any_cast<char>(
metadata.at(
"data_player_main_hand"));
217 return std::any_cast<ProtocolCraft::NBT::Value>(
metadata.at(
"data_shoulder_left"));
223 return std::any_cast<ProtocolCraft::NBT::Value>(
metadata.at(
"data_shoulder_right"));
229 return std::any_cast<const std::optional<int>&>(
metadata.at(
"data_shoulder_parrot_left"));
235 return std::any_cast<const std::optional<int>&>(
metadata.at(
"data_shoulder_parrot_right"));
243 metadata[
"data_player_absorption_id"] = data_player_absorption_id;
249 metadata[
"data_score_id"] = data_score_id;
252#if PROTOCOL_VERSION < 773
256 metadata[
"data_player_mode_customisation"] = data_player_mode_customisation;
262 metadata[
"data_player_main_hand"] = data_player_main_hand;
268 metadata[
"data_shoulder_left"] = data_shoulder_left;
274 metadata[
"data_shoulder_right"] = data_shoulder_right;
280 metadata[
"data_shoulder_parrot_left"] = data_shoulder_parrot_left;
286 metadata[
"data_shoulder_parrot_right"] = data_shoulder_parrot_right;
314#if PROTOCOL_VERSION > 765
321#if PROTOCOL_VERSION < 775
336#if PROTOCOL_VERSION > 766
367#if PROTOCOL_VERSION > 770
378#if PROTOCOL_VERSION > 404
397#if PROTOCOL_VERSION > 404
406#if PROTOCOL_VERSION > 404
413#if PROTOCOL_VERSION > 404
416 const double half_width =
GetWidth(pose) / 2.0;
417 const double half_height =
GetHeight(pose) / 2.0;
char GetDataPlayerModeCustomisation() const
void SetDataPlayerModeCustomisation(const char data_player_mode_customisation)
virtual void SetMetadataValue(const int index, const std::any &value) override
int GetDataPlayerMainHand() const
void SetDataPlayerMainHand(const int data_player_main_hand)
@ PlayerSubmergedMiningSpeed
@ 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
double GetAttributeEntityInteractionRangeValue() const
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
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...