12#if PROTOCOL_VERSION < 766
13 SetDataEffectColorId(0);
19#if PROTOCOL_VERSION > 498
22#if PROTOCOL_VERSION > 404
32#if PROTOCOL_VERSION > 763
35#if PROTOCOL_VERSION > 765
43#if PROTOCOL_VERSION > 766
51#if PROTOCOL_VERSION > 770
55#if PROTOCOL_VERSION > 774
58#if PROTOCOL_VERSION > 775
84#if PROTOCOL_VERSION < 766
85 output[
"metadata"][
"data_effect_color_id"] = GetDataEffectColorId();
91#if PROTOCOL_VERSION > 498
94#if PROTOCOL_VERSION > 404
105#if PROTOCOL_VERSION > 763
108#if PROTOCOL_VERSION > 765
116#if PROTOCOL_VERSION > 766
124#if PROTOCOL_VERSION > 770
128#if PROTOCOL_VERSION > 774
132#if PROTOCOL_VERSION > 775
156#if PROTOCOL_VERSION < 766
157 int LivingEntity::GetDataEffectColorId()
const
178#if PROTOCOL_VERSION > 498
185#if PROTOCOL_VERSION > 404
204#if PROTOCOL_VERSION < 766
205 void LivingEntity::SetDataEffectColorId(
const int data_effect_color_id)
226#if PROTOCOL_VERSION > 498
233#if PROTOCOL_VERSION > 404
247 return std::optional<EntityAttribute>();
259 LOG_WARNING(
"Trying to set attribute base value for " << type <<
" for a " <<
GetName() <<
" but it doesn't have this attribute");
262 it->second.SetBaseValue(value);
286 it->second.ClearModifiers();
335#if PROTOCOL_VERSION > 763
348#if PROTOCOL_VERSION > 765
386#if PROTOCOL_VERSION > 766
424#if PROTOCOL_VERSION > 770
438#if PROTOCOL_VERSION > 774
446#if PROTOCOL_VERSION > 775
485 it->second.RemoveModifier(key);
493 LOG_WARNING(
"Trying to set attribute modifier for " << type <<
" for a " <<
GetName() <<
" but it doesn't have this attribute");
496 it->second.SetModifier(key, modifier);
504#if PROTOCOL_VERSION > 404
511#if PROTOCOL_VERSION > 765
528#if PROTOCOL_VERSION > 766
540#if PROTOCOL_VERSION > 775
#define LOG_WARNING(osstream)
@ ExplosionKnockbackResistance
@ WaterMovementEfficiency
void SetMetadata(const int index, const std::any &value)
virtual ProtocolCraft::Json::Value Serialize() const
std::shared_mutex entity_mutex
std::vector< std::any > metadata
virtual std::string GetName() const =0
double GetAttributeGravityValueImpl() const
double GetAttributeMovementEfficiencyValueImpl() const
double GetAttributeBouncinessValueImpl() const
double GetAttributeFrictionModifierValue() const
char GetDataLivingEntityFlags() const
double GetAttributeStepHeightValueImpl() const
double GetAttributeExplosionKnockbackResistanceValue() const
double GetAttributeNameTagDistanceValue() const
double GetAttributeScaleValue() const
bool GetDataEffectAmbienceId() const
void RemoveAttributeModifier(const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key)
double GetAttributeJumpStrengthValueImpl() const
void SetDataStingerCountId(const int data_stinger_count_id)
double GetAttributeMaxHealthValue() const
std::optional< Position > GetSleepingPosId() const
void SetAttributeModifierImpl(const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key, const EntityAttribute::Modifier &modifier)
virtual bool IsLivingEntity() const override
double GetAttributeSafeFallDistanceValue() const
double GetAttributeOxygenBonusValue() const
void SetDataArrowCountId(const int data_arrow_count_id)
void ClearModifiers(const EntityAttribute::Type type)
double GetAttributeMaxAbsorptionValue() const
std::optional< Position > GetSleepingPosIdImpl() const
static constexpr int hierarchy_metadata_count
void SetAttributeModifier(const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key, const EntityAttribute::Modifier &modifier)
void SetDataEffectAmbienceId(const bool data_effect_ambience_id)
int GetDataStingerCountId() const
std::map< EntityAttribute::Type, EntityAttribute > attributes
void SetDataLivingEntityFlags(const char data_living_entity_flags)
void RemoveAttributeModifierImpl(const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key)
double GetAttributeJumpStrengthValue() const
void SetDataEffectParticles(const std::vector< ProtocolCraft::Particle > &data_effect_particles)
double GetAttributeMovementSpeedValueImpl() const
double GetAttributeMovementSpeedValue() const
void SetDataHealthId(const float data_health_id)
double GetAttributeWaterMovementEfficiencyValueImpl() const
double GetAttributeArmorToughnessValue() const
virtual ProtocolCraft::Json::Value Serialize() const override
static constexpr int metadata_count
double GetAttributeBurningTimeValue() const
char GetDataLivingEntityFlagsImpl() const
double GetAttributeGravityValue() const
int GetDataArrowCountId() const
double GetAttributeEntityInteractionRangeValue() const
double GetAttributeCameraDistanceValue() const
double GetAttributeArmorValue() const
double GetAttributeAirDragModifierValue() const
double GetAttributeStepHeightValue() const
double GetAttributeWaypointTransmitRangeValue() const
double GetAttributeBouncinessValue() const
void SetSleepingPosId(const std::optional< Position > &sleeping_pos_id)
double GetAttributeAttackKnockbackValue() const
double GetAttributeFallDamageMultiplierValue() const
double GetAttributeKnockbackResistanceValue() const
void AddAttribute(const EntityAttribute &attribute)
double GetAttributeMovementEfficiencyValue() const
float GetDataHealthId() const
double GetAttributeBelowNameDistanceValue() const
void SetAttributeBaseValue(const EntityAttribute::Type type, const double value)
double GetAttributeAirDragModifierValueImpl() const
std::vector< ProtocolCraft::Particle > GetDataEffectParticles() const
double GetAttributeWaterMovementEfficiencyValue() const
std::optional< EntityAttribute > GetAttribute(const EntityAttribute::Type type) const
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
#define BOTCRAFT_ENTITY_METADATA_INDEX(name)