|
Botcraft 26.3
|
#include <LivingEntity.hpp>
Public Member Functions | |
| LivingEntity () | |
| virtual | ~LivingEntity () |
| virtual bool | IsLivingEntity () const override |
| virtual ProtocolCraft::Json::Value | Serialize () const override |
| char | GetDataLivingEntityFlags () const |
| float | GetDataHealthId () const |
| std::vector< ProtocolCraft::Particle > | GetDataEffectParticles () const |
| bool | GetDataEffectAmbienceId () const |
| int | GetDataArrowCountId () const |
| int | GetDataStingerCountId () const |
| std::optional< Position > | GetSleepingPosId () const |
| void | SetDataLivingEntityFlags (const char data_living_entity_flags) |
| void | SetDataHealthId (const float data_health_id) |
| void | SetDataEffectParticles (const std::vector< ProtocolCraft::Particle > &data_effect_particles) |
| void | SetDataEffectAmbienceId (const bool data_effect_ambience_id) |
| void | SetDataArrowCountId (const int data_arrow_count_id) |
| void | SetDataStingerCountId (const int data_stinger_count_id) |
| void | SetSleepingPosId (const std::optional< Position > &sleeping_pos_id) |
| std::optional< EntityAttribute > | GetAttribute (const EntityAttribute::Type type) const |
| void | SetAttributeBaseValue (const EntityAttribute::Type type, const double value) |
| void | RemoveAttributeModifier (const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key) |
| void | SetAttributeModifier (const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key, const EntityAttribute::Modifier &modifier) |
| void | ClearModifiers (const EntityAttribute::Type type) |
| void | AddAttribute (const EntityAttribute &attribute) |
| double | GetAttributeMaxHealthValue () const |
| double | GetAttributeKnockbackResistanceValue () const |
| double | GetAttributeMovementSpeedValue () const |
| double | GetAttributeArmorValue () const |
| double | GetAttributeArmorToughnessValue () const |
| double | GetAttributeMaxAbsorptionValue () const |
| double | GetAttributeStepHeightValue () const |
| double | GetAttributeScaleValue () const |
| double | GetAttributeGravityValue () const |
| double | GetAttributeSafeFallDistanceValue () const |
| double | GetAttributeFallDamageMultiplierValue () const |
| double | GetAttributeJumpStrengthValue () const |
| double | GetAttributeOxygenBonusValue () const |
| double | GetAttributeBurningTimeValue () const |
| double | GetAttributeExplosionKnockbackResistanceValue () const |
| double | GetAttributeWaterMovementEfficiencyValue () const |
| double | GetAttributeMovementEfficiencyValue () const |
| double | GetAttributeAttackKnockbackValue () const |
| double | GetAttributeCameraDistanceValue () const |
| double | GetAttributeWaypointTransmitRangeValue () const |
| double | GetAttributeEntityInteractionRangeValue () const |
| double | GetAttributeBouncinessValue () const |
| double | GetAttributeAirDragModifierValue () const |
| double | GetAttributeFrictionModifierValue () const |
| double | GetAttributeNameTagDistanceValue () const |
| double | GetAttributeBelowNameDistanceValue () const |
Public Member Functions inherited from Botcraft::Entity | |
| Entity () | |
| virtual | ~Entity () |
| virtual std::string | GetName () const =0 |
| virtual EntityType | GetType () const =0 |
| AABB | GetCollider () const |
| double | GetWidth () const |
| double | GetHeight () const |
| void | LoadMetadataFromRawArray (const std::vector< unsigned char > &data) |
| char | GetDataSharedFlagsId () const |
| bool | GetDataSharedFlagsId (const EntitySharedFlagsId id) const |
| int | GetDataAirSupplyId () const |
| std::optional< ProtocolCraft::Chat > | GetDataCustomName () const |
| bool | GetDataCustomNameVisible () const |
| bool | GetDataSilent () const |
| bool | GetDataNoGravity () const |
| Pose | GetDataPose () const |
| int | GetDataTicksFrozen () const |
| void | SetDataSharedFlagsId (const char data_shared_flags_id) |
| void | SetDataSharedFlagsId (const EntitySharedFlagsId id, const bool b) |
| void | SetDataAirSupplyId (const int data_air_supply_id) |
| void | SetDataCustomName (const std::optional< ProtocolCraft::Chat > &data_custom_name) |
| void | SetDataCustomNameVisible (const bool data_custom_name_visible) |
| void | SetDataSilent (const bool data_silent) |
| void | SetDataNoGravity (const bool data_no_gravity) |
| void | SetDataPose (const Pose data_pose) |
| void | SetDataTicksFrozen (const int data_ticks_frozen) |
| int | GetEntityID () const |
| ProtocolCraft::UUID | GetUUID () const |
| Vector3< double > | GetPosition () const |
| double | GetX () const |
| double | GetY () const |
| double | GetZ () const |
| float | GetYaw () const |
| float | GetPitch () const |
| Vector3< double > | GetSpeed () const |
| double | GetSpeedX () const |
| double | GetSpeedY () const |
| double | GetSpeedZ () const |
| bool | GetOnGround () const |
| std::map< EquipmentSlot, ProtocolCraft::Slot > | GetEquipments () const |
| ProtocolCraft::Slot | GetEquipment (const EquipmentSlot slot) const |
| std::vector< EntityEffect > | GetEffects () const |
| std::vector< Renderer::Face > | GetFaces (const bool reset_uptodate_status) |
| bool | GetAreRenderedFacesUpToDate () const |
| void | SetEntityID (const int entity_id_) |
| void | SetUUID (const ProtocolCraft::UUID &uuid_) |
| virtual void | SetPosition (const Vector3< double > &position_) |
| virtual void | SetX (const double x_) |
| virtual void | SetY (const double y_) |
| virtual void | SetZ (const double z_) |
| virtual void | SetYaw (const float yaw_) |
| virtual void | SetPitch (const float pitch_) |
| void | AddSpeed (const Vector3< double > &delta) |
| void | SetSpeed (const Vector3< double > &speed_) |
| void | SetSpeedX (const double speed_x_) |
| void | SetSpeedY (const double speed_y_) |
| void | SetSpeedZ (const double speed_z_) |
| void | SetOnGround (const bool on_ground_) |
| void | SetEquipment (const EquipmentSlot slot, const ProtocolCraft::Slot &item) |
| void | SetEffects (const std::vector< EntityEffect > &effects_) |
| void | AddEffect (const EntityEffect &effect) |
| void | RemoveEffect (const EntityEffectType type) |
| void | SetAreRenderedFacesUpToDate (const bool are_rendered_faces_up_to_date_) |
| virtual bool | IsLocalPlayer () const |
| virtual bool | IsRemotePlayer () const |
| virtual bool | IsAbstractArrow () const |
| virtual bool | IsAnimal () const |
| virtual bool | IsAmbientCreature () const |
| virtual bool | IsMonster () const |
| virtual bool | IsDisplay () const |
| virtual bool | IsVehicle () const |
| virtual bool | IsTamableAnimal () const |
| virtual bool | IsAbstractSchoolingFish () const |
| virtual bool | IsWaterAnimal () const |
| virtual bool | IsAbstractChestedHorse () const |
| virtual bool | IsAbstractHurtingProjectile () const |
| virtual bool | IsMob () const |
| virtual bool | IsSpellcasterIllager () const |
| virtual bool | IsProjectile () const |
| virtual bool | IsAbstractHorse () const |
| virtual bool | IsAbstractGolem () const |
| virtual bool | IsHangingEntity () const |
| virtual bool | IsFireball () const |
| virtual bool | IsAbstractMinecart () const |
| virtual bool | IsAbstractCow () const |
| virtual bool | IsAbstractMinecartContainer () const |
| virtual bool | IsShoulderRidingEntity () const |
| virtual bool | IsAbstractPiglin () const |
| virtual bool | IsAbstractIllager () const |
| virtual bool | IsAbstractThrownPotion () const |
| virtual bool | IsAbstractFish () const |
| virtual bool | IsRaider () const |
| virtual bool | IsAbstractSkeleton () const |
| virtual bool | IsThrowableItemProjectile () const |
| virtual bool | IsAbstractVillager () const |
| virtual bool | IsAgeableMob () const |
| virtual bool | IsPathfinderMob () const |
| virtual bool | IsPatrollingMonster () const |
| virtual bool | IsThrowableProjectile () const |
| virtual bool | IsAbstractWindCharge () const |
| virtual bool | IsBlockAttachedEntity () const |
| virtual bool | IsAbstractBoat () const |
| virtual bool | IsAbstractChestBoat () const |
| virtual bool | IsAgeableWaterCreature () const |
| virtual bool | IsBoat () const |
| virtual bool | IsChestBoat () const |
| virtual bool | IsChestRaft () const |
| virtual bool | IsRaft () const |
| virtual bool | IsAvatar () const |
| virtual bool | IsAbstractNautilus () const |
| virtual bool | IsAbstractCubeMob () const |
Static Public Attributes | |
| static const std::string | speed_modifier_powder_snow_key = "minecraft:powder_snow" |
| static const std::string | speed_modifier_sprinting_key = "minecraft:sprinting" |
Protected Attributes | |
| std::map< EntityAttribute::Type, EntityAttribute > | attributes |
Protected Attributes inherited from Botcraft::Entity | |
| std::shared_mutex | entity_mutex |
| int | entity_id |
| ProtocolCraft::UUID | uuid |
| Vector3< double > | position |
| float | yaw |
| float | pitch |
| Vector3< double > | speed |
| bool | on_ground |
| std::map< EquipmentSlot, ProtocolCraft::Slot > | equipments |
| Items on this entity. | |
| std::vector< EntityEffect > | effects |
| std::vector< std::any > | metadata |
| std::vector< FaceDescriptor > | face_descriptors |
| std::vector< Renderer::Face > | faces |
| bool | are_rendered_faces_up_to_date |
Static Protected Attributes | |
| static constexpr int | metadata_count = static_cast<int>(metadata_names.size()) |
| static constexpr int | hierarchy_metadata_count = Entity::metadata_count + Entity::hierarchy_metadata_count |
Static Protected Attributes inherited from Botcraft::Entity | |
| static constexpr int | metadata_count = static_cast<int>(metadata_names.size()) |
| static constexpr int | hierarchy_metadata_count = 0 |
Static Private Attributes | |
| static constexpr std::array | metadata_names |
Additional Inherited Members | |
Static Public Member Functions inherited from Botcraft::Entity | |
| static std::shared_ptr< Entity > | CreateEntity (const EntityType type) |
Static Protected Member Functions inherited from Botcraft::Entity | |
| template<size_t N> | |
| static constexpr int | FindMetadataIndex (const std::array< std::string_view, N > &names, const std::string_view name) |
Definition at line 16 of file LivingEntity.hpp.
| Botcraft::LivingEntity::LivingEntity | ( | ) |
Definition at line 6 of file LivingEntity.cpp.
References Botcraft::EntityAttribute::AirDragModifier, Botcraft::EntityAttribute::Armor, Botcraft::EntityAttribute::ArmorToughness, Botcraft::EntityAttribute::AttackKnockback, attributes, Botcraft::EntityAttribute::BelowNameDistance, Botcraft::EntityAttribute::Bounciness, Botcraft::EntityAttribute::BurningTime, Botcraft::EntityAttribute::CameraDistance, Botcraft::EntityAttribute::EntityInteractionRange, Botcraft::EntityAttribute::ExplosionKnockbackResistance, Botcraft::EntityAttribute::FallDamageMultiplier, Botcraft::EntityAttribute::FrictionModifier, Botcraft::EntityAttribute::Gravity, hierarchy_metadata_count, Botcraft::EntityAttribute::JumpStrength, Botcraft::EntityAttribute::KnockbackResistance, Botcraft::EntityAttribute::MaxAbsorption, Botcraft::EntityAttribute::MaxHealth, Botcraft::Entity::metadata, metadata_count, Botcraft::EntityAttribute::MovementEfficiency, Botcraft::EntityAttribute::MovementSpeed, Botcraft::EntityAttribute::NameTagDistance, Botcraft::EntityAttribute::OxygenBonus, Botcraft::EntityAttribute::SafeFallDistance, Botcraft::EntityAttribute::Scale, SetDataArrowCountId(), SetDataEffectAmbienceId(), SetDataEffectParticles(), SetDataHealthId(), SetDataLivingEntityFlags(), SetDataStingerCountId(), SetSleepingPosId(), Botcraft::EntityAttribute::StepHeight, Botcraft::EntityAttribute::WaterMovementEfficiency, and Botcraft::EntityAttribute::WaypointTransmitRange.
|
virtual |
Definition at line 67 of file LivingEntity.cpp.
| void Botcraft::LivingEntity::AddAttribute | ( | const EntityAttribute & | attribute | ) |
Definition at line 289 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, Botcraft::Entity::GetName(), Botcraft::EntityAttribute::GetType(), and LOG_WARNING.
| void Botcraft::LivingEntity::ClearModifiers | ( | const EntityAttribute::Type | type | ) |
Definition at line 277 of file LivingEntity.cpp.
References attributes, and Botcraft::Entity::entity_mutex.
| std::optional< EntityAttribute > Botcraft::LivingEntity::GetAttribute | ( | const EntityAttribute::Type | type | ) | const |
Definition at line 240 of file LivingEntity.cpp.
References attributes, and Botcraft::Entity::entity_mutex.
| double Botcraft::LivingEntity::GetAttributeAirDragModifierValue | ( | ) | const |
Definition at line 453 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetAttributeAirDragModifierValueImpl().
Referenced by Serialize().
|
protected |
Definition at line 541 of file LivingEntity.cpp.
References Botcraft::EntityAttribute::AirDragModifier, and attributes.
Referenced by GetAttributeAirDragModifierValue().
| double Botcraft::LivingEntity::GetAttributeArmorToughnessValue | ( | ) | const |
Definition at line 329 of file LivingEntity.cpp.
References Botcraft::EntityAttribute::ArmorToughness, attributes, and Botcraft::Entity::entity_mutex.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeArmorValue | ( | ) | const |
Definition at line 323 of file LivingEntity.cpp.
References Botcraft::EntityAttribute::Armor, attributes, and Botcraft::Entity::entity_mutex.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeAttackKnockbackValue | ( | ) | const |
Definition at line 417 of file LivingEntity.cpp.
References Botcraft::EntityAttribute::AttackKnockback, attributes, and Botcraft::Entity::entity_mutex.
Referenced by Serialize(), and Botcraft::MobEntity::Serialize().
| double Botcraft::LivingEntity::GetAttributeBelowNameDistanceValue | ( | ) | const |
Definition at line 471 of file LivingEntity.cpp.
References attributes, Botcraft::EntityAttribute::BelowNameDistance, and Botcraft::Entity::entity_mutex.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeBouncinessValue | ( | ) | const |
Definition at line 447 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetAttributeBouncinessValueImpl().
Referenced by Serialize().
|
protected |
Definition at line 546 of file LivingEntity.cpp.
References attributes, and Botcraft::EntityAttribute::Bounciness.
Referenced by GetAttributeBouncinessValue().
| double Botcraft::LivingEntity::GetAttributeBurningTimeValue | ( | ) | const |
Definition at line 393 of file LivingEntity.cpp.
References attributes, Botcraft::EntityAttribute::BurningTime, and Botcraft::Entity::entity_mutex.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeCameraDistanceValue | ( | ) | const |
Definition at line 425 of file LivingEntity.cpp.
References attributes, Botcraft::EntityAttribute::CameraDistance, and Botcraft::Entity::entity_mutex.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeEntityInteractionRangeValue | ( | ) | const |
Definition at line 439 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::EntityInteractionRange.
Referenced by Serialize(), and Botcraft::PlayerEntity::Serialize().
| double Botcraft::LivingEntity::GetAttributeExplosionKnockbackResistanceValue | ( | ) | const |
Definition at line 399 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::ExplosionKnockbackResistance.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeFallDamageMultiplierValue | ( | ) | const |
Definition at line 373 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::FallDamageMultiplier.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeFrictionModifierValue | ( | ) | const |
Definition at line 459 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::FrictionModifier.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeGravityValue | ( | ) | const |
Definition at line 361 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetAttributeGravityValueImpl().
Referenced by Serialize().
|
protected |
Definition at line 517 of file LivingEntity.cpp.
References attributes, and Botcraft::EntityAttribute::Gravity.
Referenced by GetAttributeGravityValue().
| double Botcraft::LivingEntity::GetAttributeJumpStrengthValue | ( | ) | const |
Definition at line 379 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetAttributeJumpStrengthValueImpl().
Referenced by Botcraft::AbstractHorseEntity::Serialize(), and Serialize().
|
protected |
Definition at line 522 of file LivingEntity.cpp.
References attributes, and Botcraft::EntityAttribute::JumpStrength.
Referenced by GetAttributeJumpStrengthValue().
| double Botcraft::LivingEntity::GetAttributeKnockbackResistanceValue | ( | ) | const |
Definition at line 311 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::KnockbackResistance.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeMaxAbsorptionValue | ( | ) | const |
Definition at line 336 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::MaxAbsorption.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeMaxHealthValue | ( | ) | const |
Definition at line 305 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::MaxHealth.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeMovementEfficiencyValue | ( | ) | const |
Definition at line 411 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetAttributeMovementEfficiencyValueImpl().
Referenced by Serialize().
|
protected |
Definition at line 534 of file LivingEntity.cpp.
References attributes, and Botcraft::EntityAttribute::MovementEfficiency.
Referenced by GetAttributeMovementEfficiencyValue().
| double Botcraft::LivingEntity::GetAttributeMovementSpeedValue | ( | ) | const |
Definition at line 317 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetAttributeMovementSpeedValueImpl().
Referenced by Serialize().
|
protected |
Definition at line 343 of file LivingEntity.cpp.
References attributes, and Botcraft::EntityAttribute::MovementSpeed.
Referenced by GetAttributeMovementSpeedValue().
| double Botcraft::LivingEntity::GetAttributeNameTagDistanceValue | ( | ) | const |
Definition at line 465 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::NameTagDistance.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeOxygenBonusValue | ( | ) | const |
Definition at line 387 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::OxygenBonus.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeSafeFallDistanceValue | ( | ) | const |
Definition at line 367 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::SafeFallDistance.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeScaleValue | ( | ) | const |
Definition at line 355 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::Scale.
Referenced by Serialize().
| double Botcraft::LivingEntity::GetAttributeStepHeightValue | ( | ) | const |
Definition at line 349 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetAttributeStepHeightValueImpl().
Referenced by Serialize().
|
protected |
Definition at line 512 of file LivingEntity.cpp.
References attributes, and Botcraft::EntityAttribute::StepHeight.
Referenced by GetAttributeStepHeightValue().
| double Botcraft::LivingEntity::GetAttributeWaterMovementEfficiencyValue | ( | ) | const |
Definition at line 405 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetAttributeWaterMovementEfficiencyValueImpl().
Referenced by Serialize().
|
protected |
Definition at line 529 of file LivingEntity.cpp.
References attributes, and Botcraft::EntityAttribute::WaterMovementEfficiency.
Referenced by GetAttributeWaterMovementEfficiencyValue().
| double Botcraft::LivingEntity::GetAttributeWaypointTransmitRangeValue | ( | ) | const |
Definition at line 431 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, and Botcraft::EntityAttribute::WaypointTransmitRange.
Referenced by Serialize().
| int Botcraft::LivingEntity::GetDataArrowCountId | ( | ) | const |
Definition at line 173 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| bool Botcraft::LivingEntity::GetDataEffectAmbienceId | ( | ) | const |
Definition at line 168 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| std::vector< ProtocolCraft::Particle > Botcraft::LivingEntity::GetDataEffectParticles | ( | ) | const |
Definition at line 162 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| float Botcraft::LivingEntity::GetDataHealthId | ( | ) | const |
Definition at line 151 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Botcraft::WolfEntity::Serialize(), and Serialize().
| char Botcraft::LivingEntity::GetDataLivingEntityFlags | ( | ) | const |
Definition at line 145 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetDataLivingEntityFlagsImpl().
Referenced by Serialize().
|
protected |
Definition at line 499 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by GetDataLivingEntityFlags().
| int Botcraft::LivingEntity::GetDataStingerCountId | ( | ) | const |
Definition at line 179 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| std::optional< Position > Botcraft::LivingEntity::GetSleepingPosId | ( | ) | const |
Definition at line 186 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and GetSleepingPosIdImpl().
Referenced by Serialize().
|
protected |
Definition at line 505 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by GetSleepingPosId().
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Definition at line 72 of file LivingEntity.cpp.
| void Botcraft::LivingEntity::RemoveAttributeModifier | ( | const EntityAttribute::Type | type, |
| const EntityAttribute::ModifierKey & | key | ||
| ) |
Definition at line 265 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and RemoveAttributeModifierImpl().
|
protected |
Definition at line 478 of file LivingEntity.cpp.
References attributes.
Referenced by RemoveAttributeModifier().
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Reimplemented in Botcraft::AgeableMobEntity, Botcraft::BatEntity, Botcraft::AllayEntity, Botcraft::AnimalEntity, Botcraft::ArmadilloEntity, Botcraft::AxolotlEntity, Botcraft::BeeEntity, Botcraft::CamelEntity, Botcraft::ChickenEntity, Botcraft::CowEntity, Botcraft::MushroomCowEntity, Botcraft::DolphinEntity, Botcraft::AbstractChestedHorseEntity, Botcraft::AbstractHorseEntity, Botcraft::HorseEntity, Botcraft::LlamaEntity, Botcraft::CatEntity, Botcraft::OcelotEntity, Botcraft::AbstractFishEntity, Botcraft::PufferfishEntity, Botcraft::SalmonEntity, Botcraft::TropicalFishEntity, Botcraft::FoxEntity, Botcraft::FrogEntity, Botcraft::TadpoleEntity, Botcraft::GoatEntity, Botcraft::CopperGolemEntity, Botcraft::IronGolemEntity, Botcraft::SnowGolemEntity, Botcraft::HappyGhastEntity, Botcraft::AbstractNautilusEntity, Botcraft::ZombieNautilusEntity, Botcraft::PandaEntity, Botcraft::ParrotEntity, Botcraft::PigEntity, Botcraft::PolarBearEntity, Botcraft::RabbitEntity, Botcraft::SheepEntity, Botcraft::SnifferEntity, Botcraft::GlowSquidEntity, Botcraft::TurtleEntity, Botcraft::WolfEntity, Botcraft::AvatarEntity, Botcraft::EnderDragonEntity, Botcraft::WitherBossEntity, Botcraft::ArmorStandEntity, Botcraft::MannequinEntity, Botcraft::MobEntity, Botcraft::BlazeEntity, Botcraft::CreakingEntity, Botcraft::CreeperEntity, Botcraft::AbstractCubeMobEntity, Botcraft::SulfurCubeEntity, Botcraft::EnderManEntity, Botcraft::GhastEntity, Botcraft::GuardianEntity, Botcraft::HoglinEntity, Botcraft::PillagerEntity, Botcraft::SpellcasterIllagerEntity, Botcraft::MonsterEntity, Botcraft::PhantomEntity, Botcraft::AbstractPiglinEntity, Botcraft::PiglinEntity, Botcraft::ShulkerEntity, Botcraft::BoggedEntity, Botcraft::SkeletonEntity, Botcraft::SpiderEntity, Botcraft::StriderEntity, Botcraft::VexEntity, Botcraft::WardenEntity, Botcraft::WitchEntity, Botcraft::ZoglinEntity, Botcraft::ZombieEntity, Botcraft::ZombieVillagerEntity, Botcraft::AbstractVillagerEntity, Botcraft::VillagerEntity, Botcraft::PlayerEntity, Botcraft::RaiderEntity, and Botcraft::TamableAnimalEntity.
Definition at line 78 of file LivingEntity.cpp.
References GetAttributeAirDragModifierValue(), GetAttributeArmorToughnessValue(), GetAttributeArmorValue(), GetAttributeAttackKnockbackValue(), GetAttributeBelowNameDistanceValue(), GetAttributeBouncinessValue(), GetAttributeBurningTimeValue(), GetAttributeCameraDistanceValue(), GetAttributeEntityInteractionRangeValue(), GetAttributeExplosionKnockbackResistanceValue(), GetAttributeFallDamageMultiplierValue(), GetAttributeFrictionModifierValue(), GetAttributeGravityValue(), GetAttributeJumpStrengthValue(), GetAttributeKnockbackResistanceValue(), GetAttributeMaxAbsorptionValue(), GetAttributeMaxHealthValue(), GetAttributeMovementEfficiencyValue(), GetAttributeMovementSpeedValue(), GetAttributeNameTagDistanceValue(), GetAttributeOxygenBonusValue(), GetAttributeSafeFallDistanceValue(), GetAttributeScaleValue(), GetAttributeStepHeightValue(), GetAttributeWaterMovementEfficiencyValue(), GetAttributeWaypointTransmitRangeValue(), GetDataArrowCountId(), GetDataEffectAmbienceId(), GetDataEffectParticles(), GetDataHealthId(), GetDataLivingEntityFlags(), GetDataStingerCountId(), GetSleepingPosId(), and Botcraft::Entity::Serialize().
Referenced by Botcraft::AvatarEntity::Serialize(), Botcraft::ArmorStandEntity::Serialize(), Botcraft::MannequinEntity::Serialize(), Botcraft::MobEntity::Serialize(), and Botcraft::PlayerEntity::Serialize().
| void Botcraft::LivingEntity::SetAttributeBaseValue | ( | const EntityAttribute::Type | type, |
| const double | value | ||
| ) |
Definition at line 252 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::entity_mutex, Botcraft::Entity::GetName(), and LOG_WARNING.
| void Botcraft::LivingEntity::SetAttributeModifier | ( | const EntityAttribute::Type | type, |
| const EntityAttribute::ModifierKey & | key, | ||
| const EntityAttribute::Modifier & | modifier | ||
| ) |
Definition at line 271 of file LivingEntity.cpp.
References Botcraft::Entity::entity_mutex, and SetAttributeModifierImpl().
|
protected |
Definition at line 488 of file LivingEntity.cpp.
References attributes, Botcraft::Entity::GetName(), and LOG_WARNING.
Referenced by SetAttributeModifier().
| void Botcraft::LivingEntity::SetDataArrowCountId | ( | const int | data_arrow_count_id | ) |
Definition at line 221 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by LivingEntity().
| void Botcraft::LivingEntity::SetDataEffectAmbienceId | ( | const bool | data_effect_ambience_id | ) |
Definition at line 216 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by LivingEntity().
| void Botcraft::LivingEntity::SetDataEffectParticles | ( | const std::vector< ProtocolCraft::Particle > & | data_effect_particles | ) |
Definition at line 210 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by LivingEntity().
| void Botcraft::LivingEntity::SetDataHealthId | ( | const float | data_health_id | ) |
Definition at line 199 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by LivingEntity(), and Botcraft::WolfEntity::WolfEntity().
| void Botcraft::LivingEntity::SetDataLivingEntityFlags | ( | const char | data_living_entity_flags | ) |
Definition at line 194 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by LivingEntity().
| void Botcraft::LivingEntity::SetDataStingerCountId | ( | const int | data_stinger_count_id | ) |
Definition at line 227 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by LivingEntity().
| void Botcraft::LivingEntity::SetSleepingPosId | ( | const std::optional< Position > & | sleeping_pos_id | ) |
Definition at line 234 of file LivingEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by LivingEntity().
|
protected |
Definition at line 164 of file LivingEntity.hpp.
Referenced by Botcraft::AbstractChestedHorseEntity::AbstractChestedHorseEntity(), Botcraft::AbstractCowEntity::AbstractCowEntity(), Botcraft::AbstractCubeMobEntity::AbstractCubeMobEntity(), Botcraft::AbstractFishEntity::AbstractFishEntity(), Botcraft::AbstractHorseEntity::AbstractHorseEntity(), Botcraft::AbstractNautilusEntity::AbstractNautilusEntity(), Botcraft::AbstractSkeletonEntity::AbstractSkeletonEntity(), AddAttribute(), Botcraft::AllayEntity::AllayEntity(), Botcraft::AnimalEntity::AnimalEntity(), Botcraft::ArmadilloEntity::ArmadilloEntity(), Botcraft::ArmorStandEntity::ArmorStandEntity(), Botcraft::AxolotlEntity::AxolotlEntity(), Botcraft::BatEntity::BatEntity(), Botcraft::BeeEntity::BeeEntity(), Botcraft::BlazeEntity::BlazeEntity(), Botcraft::BoggedEntity::BoggedEntity(), Botcraft::BreezeEntity::BreezeEntity(), Botcraft::CamelEntity::CamelEntity(), Botcraft::CatEntity::CatEntity(), Botcraft::CaveSpiderEntity::CaveSpiderEntity(), Botcraft::ChickenEntity::ChickenEntity(), ClearModifiers(), Botcraft::CopperGolemEntity::CopperGolemEntity(), Botcraft::CowEntity::CowEntity(), Botcraft::CreakingEntity::CreakingEntity(), Botcraft::CreeperEntity::CreeperEntity(), Botcraft::DolphinEntity::DolphinEntity(), Botcraft::DrownedEntity::DrownedEntity(), Botcraft::ElderGuardianEntity::ElderGuardianEntity(), Botcraft::EnderDragonEntity::EnderDragonEntity(), Botcraft::EnderManEntity::EnderManEntity(), Botcraft::EndermiteEntity::EndermiteEntity(), Botcraft::EvokerEntity::EvokerEntity(), Botcraft::FoxEntity::FoxEntity(), Botcraft::FrogEntity::FrogEntity(), GetAttribute(), GetAttributeAirDragModifierValueImpl(), GetAttributeArmorToughnessValue(), GetAttributeArmorValue(), Botcraft::AllayEntity::GetAttributeAttackDamageValue(), Botcraft::AxolotlEntity::GetAttributeAttackDamageValue(), Botcraft::BeeEntity::GetAttributeAttackDamageValue(), Botcraft::DolphinEntity::GetAttributeAttackDamageValue(), Botcraft::CatEntity::GetAttributeAttackDamageValue(), Botcraft::OcelotEntity::GetAttributeAttackDamageValue(), Botcraft::FoxEntity::GetAttributeAttackDamageValue(), Botcraft::FrogEntity::GetAttributeAttackDamageValue(), Botcraft::GoatEntity::GetAttributeAttackDamageValue(), Botcraft::IronGolemEntity::GetAttributeAttackDamageValue(), Botcraft::AbstractNautilusEntity::GetAttributeAttackDamageValue(), Botcraft::PandaEntity::GetAttributeAttackDamageValue(), Botcraft::ParrotEntity::GetAttributeAttackDamageValue(), Botcraft::PolarBearEntity::GetAttributeAttackDamageValue(), Botcraft::RabbitEntity::GetAttributeAttackDamageValue(), Botcraft::WolfEntity::GetAttributeAttackDamageValue(), Botcraft::HoglinEntity::GetAttributeAttackDamageValue(), Botcraft::MonsterEntity::GetAttributeAttackDamageValue(), Botcraft::PlayerEntity::GetAttributeAttackDamageValue(), GetAttributeAttackKnockbackValue(), Botcraft::PlayerEntity::GetAttributeAttackSpeedValue(), GetAttributeBelowNameDistanceValue(), GetAttributeBouncinessValueImpl(), GetAttributeBurningTimeValue(), GetAttributeCameraDistanceValue(), GetAttributeEntityInteractionRangeValue(), GetAttributeExplosionKnockbackResistanceValue(), GetAttributeFallDamageMultiplierValue(), Botcraft::AllayEntity::GetAttributeFlyingSpeedValue(), Botcraft::BeeEntity::GetAttributeFlyingSpeedValue(), Botcraft::HappyGhastEntity::GetAttributeFlyingSpeedValue(), Botcraft::ParrotEntity::GetAttributeFlyingSpeedValue(), Botcraft::WitherBossEntity::GetAttributeFlyingSpeedValue(), Botcraft::GhastEntity::GetAttributeFlyingSpeedValue(), Botcraft::MobEntity::GetAttributeFollowRangeValue(), GetAttributeFrictionModifierValue(), GetAttributeGravityValueImpl(), GetAttributeJumpStrengthValueImpl(), GetAttributeKnockbackResistanceValue(), Botcraft::PlayerEntity::GetAttributeLuckValue(), GetAttributeMaxAbsorptionValue(), GetAttributeMaxHealthValue(), GetAttributeMovementEfficiencyValueImpl(), GetAttributeMovementSpeedValueImpl(), GetAttributeNameTagDistanceValue(), GetAttributeOxygenBonusValue(), Botcraft::PlayerEntity::GetAttributePlayerBlockBreakSpeedValue(), Botcraft::PlayerEntity::GetAttributePlayerBlockInteractionRangeValue(), Botcraft::PlayerEntity::GetAttributePlayerMiningEfficiencyValue(), Botcraft::PlayerEntity::GetAttributePlayerSneakingSpeedValueImpl(), Botcraft::PlayerEntity::GetAttributePlayerSubmergedMiningSpeedValue(), Botcraft::PlayerEntity::GetAttributePlayerSweepingDamageRatioValue(), GetAttributeSafeFallDistanceValue(), GetAttributeScaleValue(), Botcraft::ZombieEntity::GetAttributeSpawnReinforcementsChanceValue(), GetAttributeStepHeightValueImpl(), Botcraft::AnimalEntity::GetAttributeTemptRangeValue(), Botcraft::SulfurCubeEntity::GetAttributeTemptRangeValue(), GetAttributeWaterMovementEfficiencyValueImpl(), Botcraft::PlayerEntity::GetAttributeWaypointReceiveRangeValue(), GetAttributeWaypointTransmitRangeValue(), Botcraft::GhastEntity::GhastEntity(), Botcraft::GiantEntity::GiantEntity(), Botcraft::GoatEntity::GoatEntity(), Botcraft::GuardianEntity::GuardianEntity(), Botcraft::HappyGhastEntity::HappyGhastEntity(), Botcraft::HoglinEntity::HoglinEntity(), Botcraft::IllusionerEntity::IllusionerEntity(), Botcraft::IronGolemEntity::IronGolemEntity(), LivingEntity(), Botcraft::LlamaEntity::LlamaEntity(), Botcraft::MagmaCubeEntity::MagmaCubeEntity(), Botcraft::MobEntity::MobEntity(), Botcraft::MonsterEntity::MonsterEntity(), Botcraft::OcelotEntity::OcelotEntity(), Botcraft::PandaEntity::PandaEntity(), Botcraft::ParchedEntity::ParchedEntity(), Botcraft::ParrotEntity::ParrotEntity(), Botcraft::PigEntity::PigEntity(), Botcraft::PiglinBruteEntity::PiglinBruteEntity(), Botcraft::PiglinEntity::PiglinEntity(), Botcraft::PillagerEntity::PillagerEntity(), Botcraft::PlayerEntity::PlayerEntity(), Botcraft::PolarBearEntity::PolarBearEntity(), Botcraft::RabbitEntity::RabbitEntity(), Botcraft::RavagerEntity::RavagerEntity(), RemoveAttributeModifierImpl(), SetAttributeBaseValue(), SetAttributeModifierImpl(), Botcraft::SheepEntity::SheepEntity(), Botcraft::ShulkerEntity::ShulkerEntity(), Botcraft::SilverfishEntity::SilverfishEntity(), Botcraft::AbstractCubeMobEntity::SizeChanged(), Botcraft::MagmaCubeEntity::SizeChanged(), Botcraft::SlimeEntity::SizeChanged(), Botcraft::SulfurCubeEntity::SizeChanged(), Botcraft::SkeletonHorseEntity::SkeletonHorseEntity(), Botcraft::SlimeEntity::SlimeEntity(), Botcraft::SnifferEntity::SnifferEntity(), Botcraft::SnowGolemEntity::SnowGolemEntity(), Botcraft::SpiderEntity::SpiderEntity(), Botcraft::SquidEntity::SquidEntity(), Botcraft::StriderEntity::StriderEntity(), Botcraft::SulfurCubeEntity::SulfurCubeEntity(), Botcraft::TadpoleEntity::TadpoleEntity(), Botcraft::TurtleEntity::TurtleEntity(), Botcraft::VexEntity::VexEntity(), Botcraft::VillagerEntity::VillagerEntity(), Botcraft::VindicatorEntity::VindicatorEntity(), Botcraft::WardenEntity::WardenEntity(), Botcraft::WitchEntity::WitchEntity(), Botcraft::WitherBossEntity::WitherBossEntity(), Botcraft::WolfEntity::WolfEntity(), Botcraft::ZoglinEntity::ZoglinEntity(), Botcraft::ZombieEntity::ZombieEntity(), Botcraft::ZombieHorseEntity::ZombieHorseEntity(), Botcraft::ZombieNautilusEntity::ZombieNautilusEntity(), and Botcraft::ZombifiedPiglinEntity::ZombifiedPiglinEntity().
|
staticconstexprprotected |
Definition at line 38 of file LivingEntity.hpp.
Referenced by LivingEntity().
|
staticconstexprprotected |
Definition at line 37 of file LivingEntity.hpp.
Referenced by LivingEntity().
|
staticconstexprprivate |
Definition at line 19 of file LivingEntity.hpp.
|
inlinestatic |
Definition at line 137 of file LivingEntity.hpp.
|
inlinestatic |
Definition at line 138 of file LivingEntity.hpp.
Referenced by Botcraft::PhysicsManager::SetSprinting().