|
Botcraft 26.3
|
#include <DisplayEntity.hpp>
Public Member Functions | |
| DisplayEntity () | |
| virtual | ~DisplayEntity () |
| virtual bool | IsDisplay () const override |
| virtual ProtocolCraft::Json::Value | Serialize () const override |
| int | GetDataTransformationInterpolationStartDeltaTicksId () const |
| int | GetDataTransformationInterpolationDurationId () const |
| int | GetDataPosRotInterpolationDurationId () const |
| Vector3< float > | GetDataTranslationId () const |
| Vector3< float > | GetDataScaleId () const |
| std::array< float, 4 > | GetDataLeftRotationId () const |
| std::array< float, 4 > | GetDataRightRotationId () const |
| char | GetDataBillboardRenderConstraintsId () const |
| int | GetDataBrightnessOverrideId () const |
| float | GetDataViewRangeId () const |
| float | GetDataShadowRadiusId () const |
| float | GetDataShadowStrengthId () const |
| float | GetDataWidthId () const |
| float | GetDataHeightId () const |
| int | GetDataGlowColorOverrideId () const |
| void | SetDataTransformationInterpolationStartDeltaTicksId (const int data_transformation_interpolation_start_delta_ticks_id) |
| void | SetDataTransformationInterpolationDurationId (const int data_transformation_interpolation_duration_id) |
| void | SetDataPosRotInterpolationDurationId (const int data_pos_rot_interpolation_duration_id) |
| void | SetDataTranslationId (const Vector3< float > data_translation_id) |
| void | SetDataScaleId (const Vector3< float > data_scale_id) |
| void | SetDataLeftRotationId (const std::array< float, 4 > data_left_rotation_id) |
| void | SetDataRightRotationId (const std::array< float, 4 > data_right_rotation_id) |
| void | SetDataBillboardRenderConstraintsId (const char data_billboard_render_constraints_id) |
| void | SetDataBrightnessOverrideId (const int data_brightness_override_id) |
| void | SetDataViewRangeId (const float data_view_range_id) |
| void | SetDataShadowRadiusId (const float data_shadow_radius_id) |
| void | SetDataShadowStrengthId (const float data_shadow_strength_id) |
| void | SetDataWidthId (const float data_width_id) |
| void | SetDataHeightId (const float data_height_id) |
| void | SetDataGlowColorOverrideId (const int data_glow_color_override_id) |
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 | IsLivingEntity () const |
| virtual bool | IsAbstractArrow () const |
| virtual bool | IsAnimal () const |
| virtual bool | IsAmbientCreature () const |
| virtual bool | IsMonster () 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 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) |
Protected Member Functions inherited from Botcraft::Entity | |
| template<typename T > | |
| T | GetMetadataImpl (const int index) const |
| template<typename T > | |
| T | GetMetadata (const int index) const |
| void | SetMetadataImpl (const int index, const std::any &value) |
| void | SetMetadata (const int index, const std::any &value) |
| virtual void | OnMetadataChangedImpl (const int index) |
| virtual void | InitializeFaces () |
| void | OnSizeUpdated () |
| char | GetDataSharedFlagsIdImpl () const |
| bool | GetDataSharedFlagsIdImpl (const EntitySharedFlagsId id) const |
| void | SetDataSharedFlagsIdImpl (const char data_shared_flags_id) |
| void | SetDataSharedFlagsIdImpl (const EntitySharedFlagsId id, const bool b) |
| Pose | GetDataPoseImpl () const |
| void | SetDataPoseImpl (const Pose data_pose) |
| AABB | GetColliderImpl () const |
| virtual double | GetWidthImpl () const |
| virtual double | GetHeightImpl () const |
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) |
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 |
Definition at line 8 of file DisplayEntity.hpp.
| Botcraft::DisplayEntity::DisplayEntity | ( | ) |
Definition at line 6 of file DisplayEntity.cpp.
References hierarchy_metadata_count, Botcraft::Entity::metadata, metadata_count, SetDataBillboardRenderConstraintsId(), SetDataBrightnessOverrideId(), SetDataGlowColorOverrideId(), SetDataHeightId(), SetDataLeftRotationId(), SetDataPosRotInterpolationDurationId(), SetDataRightRotationId(), SetDataScaleId(), SetDataShadowRadiusId(), SetDataShadowStrengthId(), SetDataTransformationInterpolationDurationId(), SetDataTransformationInterpolationStartDeltaTicksId(), SetDataTranslationId(), SetDataViewRangeId(), and SetDataWidthId().
|
virtual |
Definition at line 32 of file DisplayEntity.cpp.
| char Botcraft::DisplayEntity::GetDataBillboardRenderConstraintsId | ( | ) | const |
Definition at line 120 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| int Botcraft::DisplayEntity::GetDataBrightnessOverrideId | ( | ) | const |
Definition at line 125 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| int Botcraft::DisplayEntity::GetDataGlowColorOverrideId | ( | ) | const |
Definition at line 155 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| float Botcraft::DisplayEntity::GetDataHeightId | ( | ) | const |
Definition at line 150 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| std::array< float, 4 > Botcraft::DisplayEntity::GetDataLeftRotationId | ( | ) | const |
Definition at line 110 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| int Botcraft::DisplayEntity::GetDataPosRotInterpolationDurationId | ( | ) | const |
Definition at line 94 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| std::array< float, 4 > Botcraft::DisplayEntity::GetDataRightRotationId | ( | ) | const |
Definition at line 115 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| Vector3< float > Botcraft::DisplayEntity::GetDataScaleId | ( | ) | const |
Definition at line 105 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| float Botcraft::DisplayEntity::GetDataShadowRadiusId | ( | ) | const |
Definition at line 135 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| float Botcraft::DisplayEntity::GetDataShadowStrengthId | ( | ) | const |
Definition at line 140 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| int Botcraft::DisplayEntity::GetDataTransformationInterpolationDurationId | ( | ) | const |
Definition at line 89 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| int Botcraft::DisplayEntity::GetDataTransformationInterpolationStartDeltaTicksId | ( | ) | const |
Definition at line 84 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| Vector3< float > Botcraft::DisplayEntity::GetDataTranslationId | ( | ) | const |
Definition at line 100 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| float Botcraft::DisplayEntity::GetDataViewRangeId | ( | ) | const |
Definition at line 130 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
| float Botcraft::DisplayEntity::GetDataWidthId | ( | ) | const |
Definition at line 145 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX.
Referenced by Serialize().
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Definition at line 38 of file DisplayEntity.cpp.
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Reimplemented in Botcraft::DisplayBlockDisplayEntity, Botcraft::DisplayItemDisplayEntity, and Botcraft::DisplayTextDisplayEntity.
Definition at line 44 of file DisplayEntity.cpp.
References GetDataBillboardRenderConstraintsId(), GetDataBrightnessOverrideId(), GetDataGlowColorOverrideId(), GetDataHeightId(), GetDataLeftRotationId(), GetDataPosRotInterpolationDurationId(), GetDataRightRotationId(), GetDataScaleId(), GetDataShadowRadiusId(), GetDataShadowStrengthId(), GetDataTransformationInterpolationDurationId(), GetDataTransformationInterpolationStartDeltaTicksId(), GetDataTranslationId(), GetDataViewRangeId(), GetDataWidthId(), and Botcraft::Entity::Serialize().
Referenced by Botcraft::DisplayBlockDisplayEntity::Serialize(), Botcraft::DisplayItemDisplayEntity::Serialize(), and Botcraft::DisplayTextDisplayEntity::Serialize().
| void Botcraft::DisplayEntity::SetDataBillboardRenderConstraintsId | ( | const char | data_billboard_render_constraints_id | ) |
Definition at line 208 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataBrightnessOverrideId | ( | const int | data_brightness_override_id | ) |
Definition at line 213 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataGlowColorOverrideId | ( | const int | data_glow_color_override_id | ) |
Definition at line 243 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataHeightId | ( | const float | data_height_id | ) |
Definition at line 238 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataLeftRotationId | ( | const std::array< float, 4 > | data_left_rotation_id | ) |
Definition at line 198 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataPosRotInterpolationDurationId | ( | const int | data_pos_rot_interpolation_duration_id | ) |
Definition at line 182 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataRightRotationId | ( | const std::array< float, 4 > | data_right_rotation_id | ) |
Definition at line 203 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataScaleId | ( | const Vector3< float > | data_scale_id | ) |
Definition at line 193 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataShadowRadiusId | ( | const float | data_shadow_radius_id | ) |
Definition at line 223 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataShadowStrengthId | ( | const float | data_shadow_strength_id | ) |
Definition at line 228 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataTransformationInterpolationDurationId | ( | const int | data_transformation_interpolation_duration_id | ) |
Definition at line 177 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataTransformationInterpolationStartDeltaTicksId | ( | const int | data_transformation_interpolation_start_delta_ticks_id | ) |
Definition at line 172 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataTranslationId | ( | const Vector3< float > | data_translation_id | ) |
Definition at line 188 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataViewRangeId | ( | const float | data_view_range_id | ) |
Definition at line 218 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
| void Botcraft::DisplayEntity::SetDataWidthId | ( | const float | data_width_id | ) |
Definition at line 233 of file DisplayEntity.cpp.
References BOTCRAFT_ENTITY_METADATA_INDEX, and Botcraft::Entity::SetMetadata().
Referenced by DisplayEntity().
|
staticconstexprprotected |
Definition at line 35 of file DisplayEntity.hpp.
Referenced by DisplayEntity().
|
staticconstexprprotected |
Definition at line 34 of file DisplayEntity.hpp.
Referenced by DisplayEntity().
|
staticconstexprprivate |
Definition at line 11 of file DisplayEntity.hpp.