LeviLamina
Loading...
Searching...
No Matches
Actor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/world/level/dimension/DimensionType.h"
5
6// auto generated inclusion list
7#include "mc/common/SubClientId.h"
8#include "mc/deps/core/math/Color.h"
9#include "mc/deps/core/math/Vec3.h"
10#include "mc/deps/core/string/HashedString.h"
11#include "mc/deps/core/utility/optional_ref.h"
12#include "mc/deps/ecs/gamerefs_entity/EntityContext.h"
13#include "mc/deps/game_refs/StackRefResult.h"
14#include "mc/deps/game_refs/WeakRef.h"
15#include "mc/deps/input/InputMode.h"
16#include "mc/deps/shared_types/legacy/EquipmentSlot.h"
17#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
18#include "mc/deps/shared_types/legacy/actor/ActorDamageCause.h"
19#include "mc/deps/shared_types/legacy/actor/ActorLocation.h"
20#include "mc/deps/shared_types/legacy/actor/ArmorSlot.h"
21#include "mc/deps/shared_types/v1_26_20/block/MaterialType.h"
22#include "mc/input/NewInteractionModel.h"
23#include "mc/legacy/ActorUniqueID.h"
24#include "mc/platform/brstd/bitset.h"
25#include "mc/server/commands/CommandPermissionLevel.h"
26#include "mc/util/MolangVariableMap.h"
27#include "mc/util/VariantParameterList.h"
28#include "mc/world/actor/ActorCategory.h"
29#include "mc/world/actor/ActorDefinitionPtr.h"
30#include "mc/world/actor/ActorEvent.h"
31#include "mc/world/actor/ActorFlags.h"
32#include "mc/world/actor/ActorInitializationMethod.h"
33#include "mc/world/actor/ActorResetRule.h"
34#include "mc/world/actor/ActorSwingSource.h"
35#include "mc/world/actor/ActorTerrainInterlockData.h"
36#include "mc/world/actor/ActorType.h"
37#include "mc/world/actor/ActorVersion.h"
38#include "mc/world/actor/ArmorMaterialType.h"
39#include "mc/world/actor/BuiltInActorComponents.h"
40#include "mc/world/actor/SpawnRuleEnum.h"
41#include "mc/world/actor/SynchedActorDataEntityWrapper.h"
42#include "mc/world/actor/animation/AnimationComponentGroupType.h"
43#include "mc/world/item/HandSlot.h"
44#include "mc/world/item/ItemUseMethod.h"
45#include "mc/world/level/ShapeType.h"
46
47// auto generated forward declare list
48// clang-format off
49class AABB;
50class ActionEvent;
51class ActionQueue;
56class ActorHurtResult;
59class ActorRuntimeID;
61class Attribute;
64class Block;
65class BlockPos;
66class BlockSource;
68class CompoundTag;
69class DataLoadHelper;
70class Dimension;
72class EntityRegistry;
73class FishingHook;
74class GameEvent;
77class ILevel;
78class ITickingArea;
80class ItemActor;
81class ItemDescriptor;
82class ItemStack;
83class ItemStackBase;
84class Level;
85class ListTag;
86class LootTable;
87class Matrix;
89class Mob;
90class MobEffect;
93class Packet;
94class Player;
95class Random;
96class RenderParams;
98class RopeSystem;
103class Vec2;
104struct AABBShapeComponent;
106struct ActorLink;
108struct DimensionType;
111struct EquipmentTable;
112struct InterpolationPair;
117namespace Bedrock::Safety { class RedactableString; }
118namespace MovementDataExtractionUtility { class SnapshotAccessor; }
119namespace VehicleUtils { struct VehicleRootInfo; }
120class IOptionsReader;
121// clang-format on
122
123class Level;
124
125class Actor {
126public:
127 // Actor inner types define
128 using EntityBlockCollisionCallback =
129 ::std::function<void(::BlockSource&, ::Block const&, ::BlockPos const&, ::Actor&)>;
130
131public:
132 LLNDAPI class EntityContext& getEntityContext() { return mEntityContext; }
133 LLNDAPI class EntityContext const& getEntityContext() const { return mEntityContext; }
134
135 LLAPI void refresh();
136
137 LLAPI optional_ref<Actor> clone(Vec3 const& pos, std::optional<DimensionType> dimId = std::nullopt) const;
138
139 LLNDAPI std::string const& getTypeName() const;
140
141 LLNDAPI class Vec3 getFeetPos() const;
142
143 LLNDAPI class Vec3 getHeadPos() const;
144
145 LLNDAPI class BlockPos getFeetBlockPos() const;
146
147 LLNDAPI bool isSimulatedPlayer() const;
148
149 LLNDAPI bool isOnGround() const;
150
151 LLAPI void setOnFire(int time, bool hasEffect = true);
152 LLAPI void stopFire();
153
154 LLNDAPI Vec3 getVelocity() const;
155 LLNDAPI float getPosDeltaPerSecLength() const;
156
157 LLAPI bool hurtByCause(
158 float damage,
159 ::SharedTypes::Legacy::ActorDamageCause cause = ::SharedTypes::Legacy::ActorDamageCause::Override,
160 optional_ref<Actor> attacker = std::nullopt
161 );
162
163 LLNDAPI class HitResult traceRay(
164 float tMax = 5.5f,
165 bool includeActor = true,
166 bool includeBlock = true,
167 std::function<bool(class BlockSource const&, class Block const&, bool)> const& blockCheckFunction =
168 [](auto&&...) -> bool { return true; }
169 ) const;
170
171 LLAPI void teleport(class Vec3 const& pos, DimensionType dimId, class Vec2 const& rotation);
172 LLAPI void teleport(class Vec3 const& pos, DimensionType dimId);
173
174 LLAPI void setName(std::string const& name);
175
176 LLNDAPI float evalMolang(std::string const& expression);
177
178 LLNDAPI AABB const& getAABB() const { return mBuiltInComponents->mAABBShapeComponent->mAABB; }
179
180 LLAPI static ::Actor* tryGetFromEntity(::EntityContext& entity, bool includeRemoved);
181
182 [[nodiscard]] Level& getLevel() const { return *reinterpret_cast<Level*>(mLevel); }
183
184 [[nodiscard]] Vec3 const& getPosition() const { return mBuiltInComponents->mStateVectorComponent->mPos; }
185
186 [[nodiscard]] Vec3 const& getPosDelta() const { return mBuiltInComponents->mStateVectorComponent->mPosDelta; }
187
188 [[nodiscard]] Vec2 const& getRotation() const { return mBuiltInComponents->mActorRotationComponent->mRot; }
189
190 [[nodiscard]] bool hasCategory(ActorCategory category) const { return (mCategories & category) == category; }
191
192 LLNDAPI ::DimensionType getDimensionId() const;
193
194 LLNDAPI bool isType(::ActorType type) const;
195
196 LLNDAPI bool isPlayer() const;
197
198public:
199 // member variables
200 // NOLINTBEGIN
201 ::ll::TypedStorage<8, 24, ::EntityContext> mEntityContext;
202 ::ll::TypedStorage<8, 72, ::VariantParameterList> mInitParams;
203 ::ll::TypedStorage<8, 32, ::std::string> mCustomInitEventName;
204 ::ll::TypedStorage<1, 1, ::ActorInitializationMethod> mInitMethod;
205 ::ll::TypedStorage<1, 1, bool> mForceInitMethodToSpawnOnReload;
206 ::ll::TypedStorage<1, 1, bool> mAdded;
207 ::ll::TypedStorage<8, 8, ::ActorDefinitionGroup*> mDefinitions;
208 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ActorDefinitionDescriptor>> mCurrentDescription;
209 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RopeSystem>> mLeashRopeSystem;
210 ::ll::TypedStorage<8, 32, ::std::string> mAlias;
211 ::ll::TypedStorage<4, 68, ::std::optional<::glm::mat4x4>> mPreviousRenderTransform;
212 ::ll::TypedStorage<4, 4, int> mLastHurtByPlayerTime;
213 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::std::vector<::std::vector<::glm::mat4x4>>>>
214 mPreviousBoneMatrices;
215 ::ll::TypedStorage<8, 48, ::SynchedActorDataEntityWrapper> mEntityData;
216 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SpatialActorNetworkData>> mNetworkData;
217 ::ll::TypedStorage<4, 12, ::Vec3> mSentDelta;
218 ::ll::TypedStorage<4, 4, float> mScale;
219 ::ll::TypedStorage<4, 4, float> mScalePrev;
220 ::ll::TypedStorage<1, 1, bool> mIgnoreLighting;
221 ::ll::TypedStorage<1, 1, bool> mFilterLighting;
222 ::ll::TypedStorage<4, 4, float> mStepSoundVolume;
223 ::ll::TypedStorage<4, 4, float> mStepSoundPitch;
224 ::ll::TypedStorage<8, 8, ::AABB*> mLastHitBB;
225 ::ll::TypedStorage<8, 8, uint64> mNameTagHash;
226 ::ll::TypedStorage<4, 4, float> mShadowOffset;
227 ::ll::TypedStorage<4, 4, float> mPushThrough;
228 ::ll::TypedStorage<4, 4, int> mTickCount;
229 ::ll::TypedStorage<4, 4, int> mInvulnerableTime;
230 ::ll::TypedStorage<4, 4, int> mLastHealth;
231 ::ll::TypedStorage<1, 1, bool> mInvulnerable;
232 ::ll::TypedStorage<4, 4, int> mFlameTexFrameIndex;
233 ::ll::TypedStorage<4, 4, float> mFlameFrameIncrementTime;
234 ::ll::TypedStorage<1, 1, bool> mAlwaysFireImmune;
235 ::ll::TypedStorage<1, 1, bool> mInheritRotationWhenRiding;
236 ::ll::TypedStorage<1, 1, bool> mForcedLoading;
237 ::ll::TypedStorage<1, 1, bool> mHighlightedThisFrame;
238 ::ll::TypedStorage<1, 1, bool> mInitialized;
239 ::ll::TypedStorage<1, 1, bool> mProcessedOnChunkDiscard;
240 ::ll::TypedStorage<4, 4, float> mSoundVolume;
241 ::ll::TypedStorage<4, 4, int> mShakeTime;
242 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLegacyUniqueID;
243 ::ll::TypedStorage<8, 16, ::WeakRef<::Dimension>> mDimension;
244 ::ll::TypedStorage<8, 8, ::ILevel*> mLevel;
245 ::ll::TypedStorage<8, 48, ::HashedString> mActorRendererId;
246 ::ll::TypedStorage<4, 4, ::ActorCategory> mCategories;
247 ::ll::TypedStorage<4, 4, ::ActorVersion> mVersion;
248 ::ll::TypedStorage<8, 32, ::BuiltInActorComponents> mBuiltInComponents;
249 ::ll::TypedStorage<8, 48, ::HashedString> mActorRendererIdThatAnimationComponentWasInitializedWith;
250 ::ll::TypedStorage<1, 1, bool> mChanged;
251 ::ll::TypedStorage<1, 1, bool> mRemoved;
252 ::ll::TypedStorage<1, 1, bool> mMovedToLimbo;
253 ::ll::TypedStorage<1, 1, bool> mMovedToUnloadedChunk;
254 ::ll::TypedStorage<1, 1, bool> mBlocksBuilding;
255 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mAnimationComponent;
256 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mUIAnimationComponent;
257 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mTargetId;
258 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mInLovePartner;
259 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CompoundTag>> mPersistingTradeOffers;
260 ::ll::TypedStorage<4, 4, int> mPersistingTradeRiches;
261 ::ll::TypedStorage<1, 1, bool> mPersistingTrade;
262 ::ll::TypedStorage<1, 1, bool> mEffectsDirty;
263 ::ll::TypedStorage<1, 1, bool> mLootDropped;
264 ::ll::TypedStorage<1, 1, bool> mLoadedFromNBTThisFrame;
265 ::ll::TypedStorage<4, 16, ::mce::Color> mHurtColor;
266 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ActorDefinitionDiffList>> mDefinitionList;
267 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CompoundTag>> mLoadedActorPropertyTag;
268 ::ll::TypedStorage<8, 16, ::ActorDefinitionPtr> mActorDefinitionPtr;
269 ::ll::TypedStorage<8, 32, ::std::string> mFilteredNameTag;
270 ::ll::TypedStorage<8, 24, ::ActorTerrainInterlockData> mTerrainInterlockData;
271 ::ll::TypedStorage<1, 1, bool> mWasHurtThisTick;
272 ::ll::TypedStorage<1, 1, bool> mWasHurtLastTick;
273 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastHurtMobId;
274 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastHurtByMobId;
275 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastHurtByPlayerId;
276 ::ll::TypedStorage<8, 8, uint64> mLastHurtTimestamp;
277 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::ActorDamageCause> mLastHurtCause;
278 ::ll::TypedStorage<4, 4, float> mLastHurt;
279 ::ll::TypedStorage<4, 4, int> mLastHurtMobTimestamp;
280 ::ll::TypedStorage<4, 4, int> mLastHurtByMobTime;
281 ::ll::TypedStorage<4, 4, int> mLastHurtByMobTimestamp;
282 ::ll::TypedStorage<1, 1, bool> mIsPredictableProjectile;
283 ::ll::TypedStorage<1, 1, bool> mIsRenderingInUI;
284#ifdef LL_PLAT_C
285 ::ll::TypedStorage<1, 1, bool> mIsOnScreen;
286 ::ll::TypedStorage<1, 1, bool> mUpdateBonesAndEffects;
287#endif
288 ::ll::TypedStorage<1, 1, bool> mUpdateEffects;
289 ::ll::TypedStorage<1, 1, bool> mCanPickupItems;
290 ::ll::TypedStorage<1, 1, bool> mHasSetCanPickupItems;
291 ::ll::TypedStorage<1, 1, bool> mChainedDamageEffects;
292 ::ll::TypedStorage<4, 4, int> mAffectedByWaterBottleTicksToEffect;
293 ::ll::TypedStorage<4, 4, ::SpawnRuleEnum> mSpawnRulesEnum;
294 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ActionQueue>> mActionQueue;
295 ::ll::TypedStorage<8, 56, ::MolangVariableMap> mMolangVariables;
296 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mFishingHookID;
297 // NOLINTEND
298
299public:
300 // prevent constructor by default
301 Actor();
302
303public:
304 // virtual functions
305 // NOLINTBEGIN
306 virtual void outOfWorld();
307
308 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
309
310 virtual void reloadHardcodedClient(::ActorInitializationMethod method);
311
312 virtual void initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const& params);
313
314 virtual void reloadComponents(::ActorInitializationMethod, ::VariantParameterList const&);
315
316 virtual void _serverInitItemStackIds();
317
318 virtual void _doInitialMove();
319
320 virtual bool hasComponent(::HashedString const& name) const;
321
322 virtual ~Actor();
323
324 virtual void resetUserPos(::ActorResetRule resetRule);
325
326 virtual ::ActorType getOwnerEntityType();
327
328 virtual void remove();
329
330 virtual ::Vec3 getFiringPos() const;
331
332 virtual float getInterpolatedBodyRot(float a = 0.0f) const;
333
334 virtual float getInterpolatedHeadRot(float a = 0.0f) const;
335
336 virtual float getInterpolatedBodyYaw(float a = 0.0f) const;
337
338 virtual float getYawSpeedInDegreesPerSecond() const;
339
340 virtual ::Vec3 getInterpolatedRidingOffset(float, int const) const;
341
342 virtual bool isFireImmune() const;
343
344 virtual void blockedByShield(::ActorDamageSource const& source, ::Actor& blocker);
345
346 virtual bool canDisableShield();
347
348 virtual void
349 teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int sourceEntityType, bool keepVelocity);
350
351 virtual void lerpMotion(::Vec3 const& delta);
352
353 virtual ::std::unique_ptr<::Packet> tryCreateAddActorPacket();
354
355 virtual void normalTick();
356
357 virtual void baseTick();
358
359 virtual void passengerTick();
360
361 virtual bool startRiding(::Actor& vehicle, bool forceRiding);
362
363 virtual void addPassenger(::Actor& passenger);
364
365 virtual ::std::string getExitTip(::std::string const& kind, ::InputMode mode, ::NewInteractionModel scheme) const;
366
367 virtual ::std::string getEntityLocNameString() const;
368
369 virtual bool isInvisible() const;
370
371 virtual bool canShowNameTag() const;
372
373 virtual ::mce::Color getNameTagTextColor() const;
374
375 virtual float getShadowRadius() const;
376
377 virtual ::Vec3 getHeadLookVector(float a = 0.0f) const;
378
379 virtual bool canInteractWithOtherEntitiesInGame() const;
380
381 virtual float getBrightness(float a, ::IConstBlockSource const& region) const;
382
383 virtual void playerTouch(::Player& player);
384
385 virtual bool isImmobile() const;
386
387 virtual bool isSilentObserver() const;
388
389 virtual bool isSleeping() const;
390
391 virtual void setSleeping(bool val);
392
393 virtual void setSneaking(bool value);
394
395 virtual bool isBlocking() const;
396
397 virtual bool isDamageBlocked(::ActorDamageSource const& source) const;
398
399 virtual bool isAlive() const;
400
401 virtual bool isOnFire() const;
402
403 virtual bool isSurfaceMob() const;
404
405 virtual bool isTargetable() const;
406
407 virtual void setTarget(::Actor* entity);
408
409 virtual bool isValidTarget(::Actor*) const;
410
411 virtual ::ActorHurtResult attack(::Actor& target, ::SharedTypes::Legacy::ActorDamageCause const& cause);
412
413 virtual void performRangedAttack(::Actor& target, float);
414
415 virtual void setOwner(::ActorUniqueID const ownerId);
416
417 virtual void setSitting(bool value);
418
419 virtual void onTame();
420
421 virtual void onFailedTame();
422
423 virtual void setStanding(bool value);
424
425 virtual bool canPowerJump() const;
426
427 virtual bool isEnchanted() const;
428
429 virtual void playAmbientSound();
430
431 virtual ::SharedTypes::Legacy::LevelSoundEvent getAmbientSound() const;
432
433 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const;
434
435 virtual ::SharedTypes::Legacy::ActorDamageCause getBlockDamageCause(::Block const& block) const;
436
437 virtual ::ActorHurtResult doFireHurt(int amount);
438
439 virtual void onLightningHit();
440
441 virtual void feed(int itemId);
442
443 virtual void handleEntityEvent(::ActorEvent eventId, int data);
444
445 virtual ::HashedString const& getActorRendererId() const;
446
447 virtual void despawn();
448
449 virtual void setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item);
450
451 virtual ::ArmorMaterialType getArmorMaterialTypeInSlot(::SharedTypes::Legacy::ArmorSlot slot) const;
452
453 virtual int getArmorTextureIndexInSlot(::SharedTypes::Legacy::ArmorSlot slot) const;
454
455 virtual float getArmorColorInSlot(::SharedTypes::Legacy::ArmorSlot slot, int channelRGBA) const;
456
457 virtual void setEquippedSlot(::SharedTypes::Legacy::EquipmentSlot slot, ::ItemStack const& item);
458
459 virtual void setCarriedItem(::ItemStack const& item);
460
461 virtual ::ItemStack const& getCarriedItem() const;
462
463 virtual void setOffhandSlot(::ItemStack const& item);
464
465 virtual ::ItemStack const& getEquippedTotem() const;
466
467 virtual bool consumeTotem();
468
469 virtual bool load(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
470
471 virtual ::HashedString const& queryEntityRenderer() const;
472
473 virtual ::ActorUniqueID getSourceUniqueID() const;
474
475 virtual bool canFreeze() const;
476
477 virtual ::AABB getLiquidAABB(::SharedTypes::v1_26_20::MaterialType const liquidType) const;
478
479 virtual void handleInsidePortal(::BlockPos const& portalPos);
480
481 virtual bool canChangeDimensionsUsingPortal() const;
482
483 virtual void changeDimension(::DimensionType toId);
484
485 virtual void changeDimension(::ChangeDimensionPacket const& packet);
486
487 virtual ::ActorUniqueID getControllingPlayer() const;
488
489 virtual float causeFallDamageToActor(float distance, float multiplier, ::ActorDamageSource source);
490
491 virtual void onSynchedDataUpdate(int dataId);
492
493 virtual bool canAddPassenger(::Actor& passenger) const;
494
495 virtual bool canPickupItem(::ItemStack const& item) const;
496
497 virtual bool canBePulledIntoVehicle() const;
498
499 virtual bool inCaravan() const;
500
501 virtual void sendMotionPacketIfNeeded();
502
503 virtual bool canSynchronizeNewEntity() const;
504
505 virtual void startSwimming();
506
507 virtual void stopSwimming();
508
509 virtual void buildDebugInfo(::std::string& out) const;
510
511 virtual ::CommandPermissionLevel getCommandPermissionLevel() const;
512
513 virtual int getDeathTime() const;
514
515 virtual bool canBeAffected(uint id) const;
516
517 virtual bool canBeAffectedByArrow(::MobEffectInstance const& effect) const;
518
519 virtual void onEffectRemoved(::MobEffectInstance& effect);
520
521 virtual bool canObstructSpawningAndBlockPlacement() const;
522
523 virtual ::AnimationComponent& getAnimationComponent();
524
525 virtual void openContainerComponent(::Player& player);
526
527 virtual bool swing(::ActorSwingSource swingSource);
528
529 virtual void useItem(::ItemStackBase& item, ::ItemUseMethod itemUseMethod, bool consumeItem);
530
531 virtual void getDebugText(::std::vector<::std::string>& outputInfo);
532
533 virtual float getMapDecorationRotation() const;
534
535 virtual float getPassengerYRotation(::Actor const& passenger) const;
536
537 virtual bool add(::ItemStack& item);
538
539 virtual bool drop(::ItemStack const& item, bool const randomly);
540
541 virtual ::InteractionResult
542 getInteraction(::Player& player, ::ActorInteraction& interaction, ::Vec3 const& location);
543
544 virtual bool canDestroyBlock(::Block const& block) const;
545
546 virtual void setAuxValue(int aux);
547
548 virtual void renderDebugServerState(::IOptionsReader const& options);
549
550 virtual void kill();
551
552 virtual void die(::ActorDamageSource const& source);
553
554 virtual bool shouldDropDeathLoot() const;
555
556 virtual void applySnapshot(
557 ::EntityContext const& snapshotEntity,
558 ::MovementDataExtractionUtility::SnapshotAccessor const& originalSnapshotEntity
559 );
560
561 virtual void onPush(::Actor& source);
562
563 virtual ::std::optional<::BlockPos> getLastDeathPos() const;
564
565 virtual ::std::optional<::DimensionType> getLastDeathDimension() const;
566
567 virtual bool hasDiedBefore() const;
568
569 virtual void doEnterWaterSplashEffect();
570
571 virtual void doExitWaterSplashEffect();
572
573 virtual void doWaterSplashEffect();
574
575 virtual bool _shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot, ::ItemStack const& item) const;
576
577 virtual bool _shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item) const;
578
579 virtual ::ActorHurtResult _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
580
581 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
582
583 virtual void addAdditionalSaveData(::CompoundTag& tag) const;
584 // NOLINTEND
585
586public:
587 // member functions
588 // NOLINTBEGIN
589 MCAPI Actor(::ILevel& level, ::EntityContext& entityContext);
590
591 MCAPI Actor(
592 ::ActorDefinitionGroup* definitions,
593 ::ActorDefinitionIdentifier const& definitionName,
594 ::EntityContext& entityContext
595 );
596
597 MCAPI ::BuiltInActorComponents _addActorBuiltInComponents();
598
599 MCAPI void _addActorNonBuiltInComponents();
600
601 MCAPI bool _applyPendingPropertyChanges();
602
603 MCAPI bool _determineCanPickupItems() const;
604
605 MCAPI ::ItemActor const* _drop(::ItemStack const& item, bool randomly);
606
607 MCFOLD ::std::vector<::MobEffectInstance>& _getAllEffectsNonConst();
608
609 MCAPI ::AnimationComponent& _getAnimationComponent(
610 ::std::shared_ptr<::AnimationComponent>& animationComponent,
611 ::AnimationComponentGroupType group
612 );
613
614 MCAPI void _initActorProperties();
615
616 MCAPI void _initAliasProperties();
617
618 MCAPI void _initializeLeashRopeSystem(::Actor* holder);
619
620 MCAPI void _initializeMaxAutoStep(float maxAutoStep);
621
622 MCAPI bool _isDeathLootAllowed() const;
623
624 MCAPI bool _isHeadInWater() const;
625
626 MCAPI bool _isItemStackNetManagerEnabled() const;
627
628 MCAPI bool _isValidBlockToTeleportOnto(::Block const& block, bool avoidLiquid) const;
629
630 MCAPI void _notifyMobEffectsOnHurt(::ActorDamageSource const& source, float damage);
631
632 MCAPI void _onVibrationDetected();
633
634 MCAPI void _refreshAABB();
635
636 MCAPI void _sendDirtyActorData();
637
638 MCAPI void _serializeComponents(::CompoundTag& tag) const;
639
640 MCAPI void _setActorTypeId(::ActorType type);
641
642 MCAPI void _setDimensionTransitionComponent(::DimensionType fromId, ::DimensionType toId, int portalCooldown);
643
644 MCAPI void _setHandContainerItem(::ItemStack const& item, ::HandSlot handSlot);
645
646 MCAPI void _setHeightOffset(float heightOffset);
647
648 MCAPI void _setLevelPtr(::ILevel* level);
649
650 MCFOLD void _setPos(::Vec3 const& pos);
651
652 MCFOLD void _setPosPrev(::Vec3 const& posPrev);
653
654 MCAPI void _setupServerAnimationComponent();
655
656 MCAPI void _syncTickCountIfAnimationComponentShared();
657
658 MCAPI bool _tryApplyDye(::Player& player, ::ItemStack const& dyeItem, ::ActorInteraction& interaction);
659
660 MCAPI void _tryPlantWitherRose();
661
662 MCAPI void _updateComposition(bool reload);
663
664 MCAPI void _upgradeActorVersion();
665
666 MCAPI void addCategory(::ActorCategory const& category);
667
668 MCAPI void addDefinitionGroup(::std::string const& name);
669
670 MCAPI void addEffect(::MobEffectInstance const& effect);
671
672 MCAPI bool addTag(::std::string const& tag);
673
674 MCAPI void applyImpulse(::Vec3 const& impulse);
675
676 MCAPI void applyOnBornPropertyChanges();
677
678 MCAPI void buildDebugGroupInfo(::std::string& out) const;
679
680 MCAPI ::Vec3 buildForward() const;
681
682 MCAPI void burn(int damage, bool inFire);
683
684 MCAPI bool canAttack(::Actor const& entity) const;
685
686 MCAPI bool canBeginOrContinueClimbingLadder() const;
687
688 MCAPI bool canCurrentlySwim() const;
689
690#ifdef LL_PLAT_C
691 MCAPI bool canDescendBlockBelowByCrouching() const;
692#endif
693
694 MCAPI bool canFly() const;
695
696 MCAPI bool canMate(::Actor const& partner) const;
697
698 MCAPI bool canOpenContainer(::Player& player) const;
699
700 MCAPI bool canReceiveMobEffectsFromGameplay() const;
701
702 MCAPI bool canSee(::Actor const& target, ::ShapeType obstructionType) const;
703
704 MCAPI bool canSee(::Vec3 const& targetPos, ::ShapeType obstructionType) const;
705
706 MCAPI bool canSee(
707 ::Actor const& target,
708 ::SharedTypes::Legacy::ActorLocation targetLocationPart,
709 ::ShapeType obstructionType
710 ) const;
711
712 MCAPI bool canSeeDaylight() const;
713
714 MCAPI void celebrateHunt(int duration, bool special);
715
716 MCAPI void checkFallDamage(float ya, bool onGround, bool recheckLiquid);
717
718 MCAPI void chorusFruitTeleport(::Vec3 const& range);
719
720 MCAPI void clearFishingHookID();
721
722 MCAPI bool closerThan(::Actor const& e, float distance) const;
723
724 MCAPI bool closerThan(::Actor const& e, float distanceXZ, float distanceY) const;
725
726 MCAPI void consumeItem(::ItemActor& itemActor, int count);
727
728 MCAPI ::UpdateEquipPacket createUpdateEquipPacket(int containerID);
729
730 MCAPI ::UpdateTradePacket createUpdateTradePacket(int containerID);
731
732 MCAPI void deregisterTagsFromLevelCache();
733
734 MCAPI float distanceSqrToBlockPosCenter(::BlockPos const& pos) const;
735
736 MCAPI float distanceTo(::Actor const& e) const;
737
738 MCAPI float distanceTo(::Vec3 const& pos) const;
739
740 MCAPI float distanceToSqr(::Actor const& e) const;
741
742 MCAPI float distanceToSqr(::Vec3 const& pos) const;
743
744 MCAPI void dropTowards(::ItemStack const& item, ::Vec3 towards);
745
746 MCAPI void enableAutoSendPosRot(bool enable);
747
748 MCAPI void equip(::EquipmentTable const& equipmentTable);
749
750 MCAPI void equip(::std::string const& lootTableFilePath);
751
752 MCAPI void equipFromEquipmentDefinition();
753
754 MCAPI float evaluateSeatRotation(::RideableComponent const& rideable, bool useVehicleRenderParams);
755
756 MCAPI bool executeEvent(::std::string const& name, ::VariantParameterList const& list);
757
758 MCAPI void exitVehicle(bool exitFromPassenger, bool actorIsBeingDestroyed, bool wasEjectedByActivatorRail);
759
760 MCAPI ::FishingHook* fetchFishingHook();
761
762 MCAPI ::std::vector<::DistanceSortedActor> fetchNearbyActorsSorted(::Vec3 const& distance);
763
764 MCAPI ::std::vector<::DistanceSortedActor> fetchNearbyActorsSorted(::Vec3 const& distance, ::ActorType actorTypeId);
765
766 MCAPI ::Vec2 const& getAABBDim() const;
767
768#ifdef LL_PLAT_C
769 MCAPI int getActiveEffectCount() const;
770#endif
771
772 MCAPI ::ActorDefinitionIdentifier const& getActorIdentifier() const;
773
774#ifdef LL_PLAT_C
775 MCAPI ::Matrix getActorToWorldTransform(float frameAlpha, bool useActorRotation, ::Vec3 const& offset) const;
776#endif
777
778 MCFOLD ::std::vector<::MobEffectInstance> const& getAllEffects() const;
779
780 MCAPI ::ItemStack const& getArmor(::SharedTypes::Legacy::ArmorSlot slot) const;
781
782 MCAPI ::Vec3 getAttachPos(::SharedTypes::Legacy::ActorLocation location) const;
783
784 MCAPI ::Vec3 getAttachPos(::SharedTypes::Legacy::ActorLocation location, float alpha) const;
785
786 MCAPI ::AttributeInstanceConstRef getAttribute(::Attribute const& attribute) const;
787
788 MCAPI ::gsl::not_null<::BaseAttributeMap const*> getAttributes() const;
789
790 MCAPI ::gsl::not_null<::BaseAttributeMap*> getAttributes();
791
792 MCAPI ::BlockPos getBlockPosCurrentlyStandingOn(::Actor const* actor) const;
793
794 MCAPI ::BlockPos getBlockTarget() const;
795
796 MCAPI float getBrightness(float a = 0.0f) const;
797
798#ifdef LL_PLAT_C
799 MCAPI float getCameraDistance();
800#endif
801
802 MCFOLD bool getCanPickupItems() const;
803
804 MCAPI ::ItemStack const& getCarriedItemInSlotPreferredBy(::ItemStack const& item) const;
805
806#ifdef LL_PLAT_C
807 MCAPI ::Vec3 getCenter(float a) const;
808#endif
809
810 MCAPI ::Vec3 getCenteredPosition() const;
811
812 MCAPI bool getChainedDamageEffects() const;
813
814 MCAPI int getChestSlots() const;
815
816 MCAPI bool getCollidableMob() const;
817
818 MCAPI float getCurrentSwimAmount() const;
819
820 MCAPI bool getDamageNearbyMobs() const;
821
822 MCAPI ::ActorDefinitionDiffList* getDiffListNonConst();
823
824 MCFOLD ::Dimension& getDimension() const;
825
826 MCFOLD ::BlockSource& getDimensionBlockSource() const;
827
828 MCFOLD ::BlockSource const& getDimensionBlockSourceConst() const;
829
830 MCFOLD ::Dimension const& getDimensionConst() const;
831
832 MCAPI ::MobEffectInstance const* getEffect(::MobEffect const& effect) const;
833
834 MCAPI ::MobEffectInstance const* getEffect(uint effectId) const;
835
836 MCFOLD ::SynchedActorDataEntityWrapper const& getEntityData() const;
837
838 MCFOLD ::SynchedActorDataEntityWrapper& getEntityData();
839
840 MCAPI ::StackRefResult<::EntityRegistry> getEntityRegistry();
841
842 MCFOLD ::ActorTerrainInterlockData& getEntityTerrainInterlockData();
843
844 MCAPI ::ActorType getEntityTypeId() const;
845
846 MCAPI int getEquipSlots() const;
847
848 MCAPI int getEquipmentCount() const;
849
850 MCAPI ::SharedTypes::Legacy::EquipmentSlot getEquipmentSlotForItem(::ItemStack const& item) const;
851
852 MCAPI ::ItemStack const& getEquippedSlot(::SharedTypes::Legacy::EquipmentSlot slot) const;
853
854 MCAPI ::Vec3 getEyePos() const;
855
856 MCAPI float getFallDistance() const;
857
858#ifdef LL_PLAT_C
859 MCAPI ::std::string getFilteredNameTag() const;
860#endif
861
862 MCAPI bool getFirstAvailableSeatPos(::Actor& potentialPassenger, ::Vec3& result) const;
863
864 MCAPI ::Actor* getFirstPassenger() const;
865
866 MCAPI int getHealth() const;
867
868#ifdef LL_PLAT_C
869 MCAPI ::mce::Color const& getHurtColor() const;
870#endif
871
872 MCAPI int getHurtDir() const;
873
874 MCAPI int getHurtTime() const;
875
876 MCFOLD ::ILevel const& getILevel() const;
877
878 MCFOLD ::ILevel& getILevel();
879
880 MCFOLD ::ActorInitializationMethod getInitializationMethod() const;
881
882#ifdef LL_PLAT_C
883 MCAPI ::Block const* getInsideBlock() const;
884#endif
885
886 MCAPI ::Vec3 getInterpolatedPosition(float a = 0.0f) const;
887
888 MCAPI ::Vec3 getInterpolatedRidingPosition(float a = 0.0f) const;
889
890 MCAPI ::Vec2 getInterpolatedRotation(float a) const;
891
892 MCAPI int getInventorySize() const;
893
894 MCAPI bool getIsExperienceDropEnabled() const;
895
896#ifdef LL_PLAT_C
897 MCAPI bool getIsOnScreen() const;
898#endif
899
900 MCAPI ::Mob* getLastHurtByMob();
901
902 MCAPI ::ActorUniqueID getLastHurtByMobID() const;
903
904 MCAPI int getLastHurtByMobTime();
905
906 MCFOLD int getLastHurtByMobTimestamp();
907
908 MCAPI ::Player* getLastHurtByPlayer();
909
910 MCAPI ::ActorUniqueID getLastHurtByPlayerID() const;
911
912 MCFOLD ::SharedTypes::Legacy::ActorDamageCause getLastHurtCause() const;
913
914 MCAPI float getLastHurtDamage() const;
915
916 MCAPI ::Mob* getLastHurtMob();
917
918 MCAPI int getLastHurtMobTimestamp();
919
920 MCFOLD uint64 getLastHurtTimestamp() const;
921
922 MCAPI ::ActorUniqueID getLeashHolder() const;
923
924 MCFOLD ::Level& getLevel();
925
926 MCAPI uint64 getLevelTimeStamp() const;
927
928 MCAPI int getLimitedLifetimeTicks() const;
929
930 MCAPI ::std::vector<::ActorLink> getLinks() const;
931
932#ifdef LL_PLAT_C
933 MCAPI ::ModelPartLocator const* getLocator(::HashedString const& locatorName);
934#endif
935
936 MCAPI ::LootTable* getLootTable();
937
938 MCAPI int getMarkVariant() const;
939
940 MCAPI float getMaxAutoStep() const;
941
942 MCAPI int getMaxHealth() const;
943
944#ifdef LL_PLAT_C
945 MCAPI int64 getMetadataId() const;
946#endif
947
948 MCFOLD ::MolangVariableMap& getMolangVariables();
949
950 MCAPI ::MutableAttributeWithContext getMutableAttribute(::Attribute const& attribute);
951
952 MCAPI ::std::string const& getNameTag() const;
953
954 MCFOLD uint64 getNameTagAsHash() const;
955
956 MCAPI float getNameplateRenderDistanceMax() const;
957
958 MCAPI ::ItemStack const& getOffhandSlot() const;
959
960 MCAPI int getOnDeathExperience();
961
962 MCAPI ::DynamicProperties& getOrAddDynamicProperties();
963
964 MCAPI ::ActorUniqueID const& getOrCreateUniqueID() const;
965
966 MCAPI ::Mob* getOwner() const;
967
968 MCAPI ::ActorUniqueID const getOwnerId() const;
969
970 MCAPI int getPassengerIndex(::Actor const& passenger) const;
971
972 MCAPI ::std::unique_ptr<::CompoundTag> getPersistingTradeOffers();
973
974 MCAPI int getPersistingTradeRiches();
975
976 MCAPI ::Player* getPlayerOwner() const;
977
978 MCFOLD ::Vec3& getPosDeltaNonConst();
979
980 MCAPI ::Vec3 const& getPosPrev() const;
981
982 MCAPI float getRadius() const;
983
984 MCAPI ::Random& getRandom() const;
985
986 MCAPI ::Bedrock::Safety::RedactableString getRedactableNameTag() const;
987
988#ifdef LL_PLAT_C
989 MCAPI ::ActorUniqueID getRenderLeashHolder();
990#endif
991
992 MCAPI ::RenderParams& getRenderParams();
993
994 MCAPI float getRidingHeight() const;
995
996 MCAPI ::Vec2 const& getRotationPrev() const;
997
998 MCAPI ::ActorRuntimeID getRuntimeID() const;
999
1000#ifdef LL_PLAT_C
1001 MCAPI float getScaleFactor(float a) const;
1002
1003 MCAPI ::std::string const& getScoreTag() const;
1004#endif
1005
1006 MCFOLD int getShakeTime() const;
1007
1008 MCAPI int getSkinID() const;
1009
1010 MCFOLD ::SpatialActorNetworkData& getSpatialNetworkData();
1011
1012 MCAPI float getSpeedInMetersPerSecond() const;
1013
1014 MCAPI ::Vec3 getSpeedVectorInMetersPerSecond() const;
1015
1016 MCAPI bool getStatusFlag(::ActorFlags flag) const;
1017
1018 MCAPI int getStrength() const;
1019
1020 MCAPI int getStrengthMax() const;
1021
1022 MCAPI int getStructuralIntegrity() const;
1023
1024#ifdef LL_PLAT_C
1025 MCAPI ::SubClientId getSubClientId() const;
1026#endif
1027
1028 MCAPI float getSwimAmount(float a) const;
1029
1030 MCAPI ::std::vector<::std::string> const getTags() const;
1031
1032 MCAPI ::Actor* getTarget() const;
1033
1034 MCAPI ::ActorUniqueID getTargetId() const;
1035
1036 MCAPI ::ITickingArea* getTickingArea();
1037
1038 MCAPI bool getTradeInterest() const;
1039
1040 MCAPI ::MerchantRecipeList* getTradeOffers();
1041
1042 MCAPI ::Player* getTradingPlayer() const;
1043
1044#ifdef LL_PLAT_C
1045 MCAPI bool getUIRendering() const;
1046#endif
1047
1048 MCAPI ::ValidMutableAttributeWithContext getValidMutableAttribute(::Attribute const& attribute);
1049
1050 MCAPI int getVariant() const;
1051
1052 MCAPI ::Actor* getVehicle() const;
1053
1054 MCAPI ::VehicleUtils::VehicleRootInfo getVehicleRoot() const;
1055
1056 MCAPI ::ActorRuntimeID getVehicleRuntimeID() const;
1057
1058 MCAPI float getVerticalSpeedInMetersPerSecond() const;
1059
1060 MCAPI ::Vec3 getViewVector(float a = 0.0f) const;
1061
1062#ifdef LL_PLAT_C
1063 MCAPI ::Vec2 getViewVector2(float a) const;
1064#endif
1065
1066 MCAPI float getYHeadRot() const;
1067
1068 MCAPI ::InterpolationPair getYHeadRotationsNewOld() const;
1069
1070 MCAPI void handleFallDamage(float fallDistance, float multiplier, ::ActorDamageSource source);
1071
1072 MCAPI void handleLeftoverFallDamage(float damage, ::ActorDamageSource source);
1073
1074 MCAPI bool hasAnyEffects() const;
1075
1076 MCAPI bool hasBeenHurtByMobInLastTicks(int numberOfTicks) const;
1077
1078#ifdef LL_PLAT_C
1079 MCAPI bool hasDefinitionGroup(::std::string const& name) const;
1080#endif
1081
1082 MCAPI bool hasDimension() const;
1083
1084 MCAPI bool hasEffect(::MobEffect const& effect) const;
1085
1086 MCAPI bool hasFamily(::HashedString const& family) const;
1087
1088#ifdef LL_PLAT_C
1089 MCAPI bool hasFilteredNameTag() const;
1090#endif
1091
1092 MCAPI bool hasFishingHook() const;
1093
1094 MCFOLD bool hasLevel() const;
1095
1096 MCAPI bool hasPassenger() const;
1097
1098 MCAPI bool hasPersistingTrade() const;
1099
1100 MCAPI bool hasPlayerPassenger() const;
1101
1102 MCAPI bool hasPriorityAmmunition() const;
1103
1104 MCAPI bool hasRuntimeID() const;
1105
1106 MCAPI bool hasSaddle() const;
1107
1108 MCAPI bool hasTag(::std::string const& tag) const;
1109
1110 MCAPI bool hasTags() const;
1111
1112 MCAPI bool hasTeleported() const;
1113
1114 MCAPI bool hasTotemEquipped() const;
1115
1116 MCAPI bool hasType(::ActorType types) const;
1117
1118 MCAPI bool hasUniqueID() const;
1119
1120 MCAPI void heal(int heal);
1121
1122 MCAPI ::ActorHurtResult hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
1123
1124 MCAPI bool inDownwardFlowingLiquid() const;
1125
1126 MCFOLD void initParams(::VariantParameterList& params);
1127
1128 MCAPI void initParams(::RenderParams& params);
1129
1130 MCFOLD void initParams(::VariantParameterListConst& params) const;
1131
1132 MCAPI bool intersects(::Vec3 const& pos1, ::Vec3 const& pos2) const;
1133
1134 MCAPI bool isActorLocationInMaterial(
1135 ::SharedTypes::Legacy::ActorLocation actorLocation,
1136 ::SharedTypes::v1_26_20::MaterialType type
1137 ) const;
1138
1139 MCAPI bool isAdventure() const;
1140
1141 MCAPI bool isAffectedByWaterBottle() const;
1142
1143 MCAPI bool isAngry() const;
1144
1145 MCAPI bool isAttackableGamemode() const;
1146
1147 MCAPI bool isAutonomous() const;
1148
1149 MCAPI bool isBaby() const;
1150
1151 MCAPI bool isBreakingObstruction() const;
1152
1153 MCAPI bool isBribed() const;
1154
1155 MCAPI bool isCharged() const;
1156
1157 MCAPI bool isChested() const;
1158
1159 MCAPI bool isClientSide() const;
1160
1161 MCAPI bool isClimbing() const;
1162
1163#ifdef LL_PLAT_C
1164 MCAPI bool isControlledByLocalInstance() const;
1165#endif
1166
1167 MCAPI bool isCreative() const;
1168
1169 MCAPI bool isDancing() const;
1170
1171 MCAPI bool isDead() const;
1172
1173 MCAPI bool isDoorBreaker() const;
1174
1175 MCAPI bool isDoorOpener() const;
1176
1177 MCAPI bool isGlobal() const;
1178
1179 MCAPI bool isIgnited() const;
1180
1181 MCAPI bool isImmersedInWater() const;
1182
1183 MCAPI bool isInClouds() const;
1184
1185 MCAPI bool isInContactWithWater() const;
1186
1187 MCAPI bool isInLava() const;
1188
1189 MCAPI bool isInLove() const;
1190
1191 MCAPI bool isInPrecipitation() const;
1192
1193 MCAPI bool isInRain() const;
1194
1195 MCAPI bool isInScaffolding() const;
1196
1197 MCAPI bool isInSnow() const;
1198
1199 MCAPI bool isInThunderstorm() const;
1200
1201 MCAPI bool isInWater() const;
1202
1203 MCAPI bool isInWaterOrRain() const;
1204
1205 MCAPI bool isInWorld() const;
1206
1207 MCAPI bool isInsidePortal() const;
1208
1209 MCAPI bool isInvertedHealAndHarm() const;
1210
1211 MCAPI bool isJumping() const;
1212
1213 MCAPI bool isLayingDown() const;
1214
1215 MCAPI bool isLeashed() const;
1216
1217 MCAPI bool isLocalPlayer() const;
1218
1219 MCAPI bool isMovedToLimbo() const;
1220
1221 MCAPI bool isMovedToUnloadedChunk() const;
1222
1223 MCAPI bool isMoving() const;
1224
1225 MCAPI bool isNameplateDepthTested() const;
1226
1227 MCAPI bool isOrphan() const;
1228
1229 MCAPI bool isOutOfControl() const;
1230
1231 MCAPI bool isOverScaffolding() const;
1232
1233 MCAPI bool isOverWater() const;
1234
1235 MCAPI bool isPacified() const;
1236
1237#ifdef LL_PLAT_C
1238 MCAPI bool isPassenger(::ActorUniqueID const& id) const;
1239#endif
1240
1241 MCAPI bool isPassenger(::Actor const& passenger) const;
1242
1243 MCAPI bool isPersistent() const;
1244
1245 MCAPI bool isPlayingDead() const;
1246
1247 MCAPI bool isPowered() const;
1248
1249 MCAPI bool isRemotePlayer() const;
1250
1251 MCAPI bool isRemoved() const;
1252
1253 MCAPI bool isResting() const;
1254
1255 MCAPI bool isRiding() const;
1256
1257 MCAPI bool isRiding(::Actor* targetVehicle) const;
1258
1259 MCAPI bool isSheared() const;
1260
1261 MCAPI bool isSilent() const;
1262
1263 MCAPI bool isSitting() const;
1264
1265 MCAPI bool isSneaking() const;
1266
1267 MCAPI bool isSpectator() const;
1268
1269 MCAPI bool isStanding() const;
1270
1271 MCAPI bool isSurvival() const;
1272
1273 MCAPI bool isSwimmer() const;
1274
1275 MCAPI bool isSwimming() const;
1276
1277 MCAPI bool isTame() const;
1278
1279 MCAPI bool isTickingEntity() const;
1280
1281 MCAPI bool isTouchingDamageBlock() const;
1282
1283 MCAPI bool isTrading() const;
1284
1285 MCAPI bool isTrusting() const;
1286
1287 MCAPI bool isUnderLiquid(::SharedTypes::v1_26_20::MaterialType type) const;
1288
1289 MCAPI bool isUseNewTradeScreen() const;
1290
1291 MCAPI bool isWalker() const;
1292
1293 MCAPI bool isWearingLeatherArmor() const;
1294
1295 MCAPI bool isWorldBuilder() const;
1296
1297 MCAPI void killed(::Actor& entity);
1298
1299 MCAPI void lerpTo(::Vec3 const& pos, ::Vec2 const& rot, int steps);
1300
1301 MCAPI void lerpTo(::Vec3 const& pos, ::Vec2 const& rot, float headYaw, int steps);
1302
1303 MCAPI void loadEntityFlags(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
1304
1305 MCAPI void
1306 loadLinks(::CompoundTag const& entityTag, ::std::vector<::ActorLink>& links, ::DataLoadHelper& dataLoadHelper);
1307
1308 MCFOLD ::ActorUniqueID const& lovePartnerId() const;
1309
1310 MCAPI void markHurt();
1311
1312 MCFOLD void migrateUniqueID(::ActorUniqueID id);
1313
1314 MCAPI void move(::Vec3 const& posDelta);
1315
1316 MCAPI void moveRelative(float xa, float ya, float za, float speed);
1317
1318 MCAPI void moveTo(::Vec3 const& pos, ::Vec2 const& rot);
1319
1320 MCAPI void onAffectedByWaterBottle();
1321
1322 MCAPI bool onClimbableBlock() const;
1323
1324 MCAPI void onEffectAdded(::MobEffectInstance& effect);
1325
1326 MCAPI void onEffectUpdated(::MobEffectInstance& effect);
1327
1328 MCAPI void onOrphan();
1329
1330#ifdef LL_PLAT_C
1331 MCAPI void onSynchedFlagUpdate(::brstd::bitset<130, uint64> const& changedFlags);
1332#endif
1333
1334 MCAPI bool operator!=(::Actor const& rhs) const;
1335
1336 MCAPI bool operator==(::Actor const& rhs) const;
1337
1338 MCAPI void pickUpItem(::ItemActor& itemActor, int count);
1339
1340 MCAPI void playSound(::SharedTypes::Legacy::LevelSoundEvent type, ::Vec3 const& pos, int data);
1341
1342 MCAPI void playSound(
1343 ::IConstBlockSource const& region,
1344 ::SharedTypes::Legacy::LevelSoundEvent type,
1345 ::Vec3 const& pos,
1346 int data
1347 );
1348
1349 MCAPI void playSynchronizedSound(
1350 ::SharedTypes::Legacy::LevelSoundEvent type,
1351 ::Vec3 const& pos,
1352 ::Block const& block,
1353 bool isGlobal,
1354 ::std::optional<::Vec3> const& fireAtPosition
1355 );
1356
1357 MCAPI void playSynchronizedSound(
1358 ::SharedTypes::Legacy::LevelSoundEvent type,
1359 ::Vec3 const& pos,
1360 int data,
1361 bool isGlobal,
1362 ::std::optional<::Vec3> const& fireAtPosition
1363 );
1364
1365 MCAPI void positionAllPassengers();
1366
1367 MCAPI void positionPassenger(::Actor& passenger);
1368
1369 MCAPI void postGameEvent(::GameEvent const& gameEvent, ::Vec3 const& originPos, ::Block const* affectedBlock);
1370
1371 MCAPI void postSplashGameEvent();
1372
1373 MCAPI bool pullInEntity(::Actor& e);
1374
1375 MCAPI void pushBackActionEventToActionQueue(::ActionEvent actionEvent);
1376
1377 MCAPI void pushOutOfBlocks(::Vec3 const& vec);
1378
1379 MCAPI void queueBBUpdateFromDefinition();
1380
1381 MCAPI void queueBBUpdateFromValue(::Vec2 const& value);
1382
1383 MCAPI void refreshComponents();
1384
1385 MCAPI void reload();
1386
1387 MCAPI void removeAllEffects();
1388
1389 MCAPI void removeAllPassengers(bool actorIsBeingDestroyed, bool exitFromPassenger);
1390
1391 MCAPI void removeEffect(int effectId);
1392
1393 MCAPI void removePersistingTrade();
1394
1395 MCAPI bool removeTag(::std::string const& tag);
1396
1397 MCAPI bool save(::CompoundTag& entityTag) const;
1398
1399 MCAPI void saveEntityFlags(::CompoundTag& entityTag) const;
1400
1401 MCAPI ::std::unique_ptr<::ListTag> saveLinks() const;
1402
1403 MCAPI void savePersistingTrade(::std::unique_ptr<::CompoundTag> offersTag, int riches);
1404
1405 MCAPI void saveWithoutId(::CompoundTag& entityTag) const;
1406
1407 MCAPI void serializationSetHealth(int newHealth);
1408
1409 MCAPI void setAABB(::AABB const& aabb);
1410
1411 MCAPI void setAABBDim(::Vec2 const& dim);
1412
1413 MCAPI void setActorRendererId(::HashedString actorRendererId);
1414
1415 MCAPI void setAutonomous(bool g);
1416
1417 MCAPI void setBaseDefinition(::ActorDefinitionIdentifier const& sourceId, bool clearDefs, bool update);
1418
1419 MCFOLD void setBlockTarget(::BlockPos const& target);
1420
1421 MCAPI void setBreakingObstruction(bool breaking);
1422
1423#ifdef LL_PLAT_C
1424 MCAPI void setCameraDistance(float cameraDistance);
1425#endif
1426
1427 MCAPI void setCanFly(bool value);
1428
1429 MCAPI void setChainedDamageEffects(bool active);
1430
1431#ifdef LL_PLAT_C
1432 MCAPI void setChanged();
1433#endif
1434
1435 MCAPI void setCharged(bool value);
1436
1437 MCAPI void setClimbing(bool value);
1438
1439 MCAPI void setDancing(bool dancing);
1440
1441 MCAPI void setDead(bool isDead);
1442
1443 MCAPI void setDimension(::WeakRef<::Dimension> weakDimension);
1444
1445 MCAPI void setDoorBreaker(bool breaker);
1446
1447 MCAPI void setDoorOpener(bool opener);
1448
1449 MCAPI void setEnchanted(bool value);
1450
1451#ifdef LL_PLAT_C
1452 MCAPI void setEquipFromPacket(::UpdateEquipPacket const& packet);
1453#endif
1454
1455 MCAPI void setFallDistance(float distance);
1456
1457#ifdef LL_PLAT_C
1458 MCAPI void setFilteredNameTag(::std::string const& filteredName);
1459#endif
1460
1461 MCAPI void setFishingHookID(::ActorUniqueID newUniqueID);
1462
1463 MCAPI void setGlobal(bool g);
1464
1465 MCAPI void setHurtDir(int hurtDir);
1466
1467 MCAPI void setHurtTime(int hurtTime);
1468
1469 MCAPI void setInLove(::Actor* lovePartner);
1470
1471 MCAPI void setInterpolation();
1472
1473 MCAPI void setInvisible(bool value);
1474
1475 MCAPI void setIsExperienceDropEnabled(bool isExperienceDropEnabled);
1476
1477#ifdef LL_PLAT_C
1478 MCAPI void setIsOnScreen(bool isOnScreen);
1479#endif
1480
1481 MCAPI void setJumping(bool jump);
1482
1483 MCAPI void setLastHitBB(::Vec3 const& pos, ::Vec3 const& radius);
1484
1485 MCAPI void setLastHurtByMob(::Mob* mob);
1486
1487 MCAPI void setLastHurtByPlayer(::Player* player);
1488
1489 MCAPI void setLastHurtMob(::Mob const& target);
1490
1491 MCAPI void setLayingDown(bool value);
1492
1493 MCAPI void setLeashHolder(::ActorUniqueID leashHolder);
1494
1495 MCAPI void setLimitedLifetimeTicks(int lifetimeTicks);
1496
1497 MCAPI void setMarkVariant(int value);
1498
1499 MCAPI void setMovedToLimbo(bool moveToLimbo);
1500
1501 MCAPI void setMovedToUnloadedChunk(bool movedToUnloadedChunk);
1502
1503 MCAPI void setMoving(bool value);
1504
1505 MCAPI void setNameTag(::std::string const& name);
1506
1507 MCAPI void setNameTagVisible(bool visible);
1508
1509 MCAPI void setNameplateDepthTested(bool value);
1510
1511 MCAPI void setNameplateRenderDistanceMax(float distanceMax);
1512
1513 MCAPI void setObstructsBlockPlacement(bool obstructs);
1514
1515#ifdef LL_PLAT_C
1516 MCAPI void setOffersFromPacket(::UpdateTradePacket const& packet);
1517#endif
1518
1519 MCAPI void setPersistent();
1520
1521 MCAPI void setPos(::Vec3 const& pos);
1522
1523 MCFOLD void setPosDelta(::Vec3 const& posDelta);
1524
1525 MCFOLD void setPosDirectLegacy(::Vec3 const& pos);
1526
1527 MCFOLD void setPosPrev(::Vec3 const& posPrev);
1528
1529 MCAPI void setPrevPosRotSetThisTick(bool value);
1530
1531 MCAPI void setPreviousPosRot();
1532
1533 MCAPI void setRedactableNameTag(::Bedrock::Safety::RedactableString const& name);
1534
1535 MCAPI void setResting(bool value);
1536
1537 MCAPI void setRotationDirectly(::Vec2 const& rot);
1538
1539 MCAPI void setRotationPrev(::Vec2 const& rotation);
1540
1541#ifdef LL_PLAT_C
1542 MCAPI void setRotationPrevX(float rotX);
1543#endif
1544
1545 MCAPI void setRotationPrevY(float rotY);
1546
1547 MCAPI void setRotationWrapped(::Vec2 const& rot);
1548
1549 MCAPI void setRotationX(float rotX);
1550
1551 MCAPI void setRotationY(float rotY);
1552
1553 MCAPI void setRuntimeID(::ActorRuntimeID id);
1554
1555 MCAPI void setSaddle(bool saddled);
1556
1557 MCAPI void setScared(bool status);
1558
1559 MCAPI void setScoreTag(::std::string const& score);
1560
1561 MCAPI void setShakeTime(int time);
1562
1563 MCAPI void setSkinID(int value);
1564
1565 MCAPI void setStatusFlag(::ActorFlags flag, bool value);
1566
1567 MCAPI void setStrength(int strength);
1568
1569 MCAPI void setStrengthMax(int strength);
1570
1571 MCAPI void setStructuralIntegrity(int damage);
1572
1573 MCAPI void setSwimmer(bool swimmer);
1574
1575 MCAPI void setTempted(bool tempted);
1576
1577 MCAPI void setTradeInterest(bool interested);
1578
1579 MCAPI void setTradingPlayer(::Player* player);
1580
1581#ifdef LL_PLAT_C
1582 MCAPI void setUIRendering(bool isInUI);
1583#endif
1584
1585 MCFOLD void setUniqueID(::ActorUniqueID id);
1586
1587#ifdef LL_PLAT_C
1588 MCAPI void setUpdateBonesAndEffects(bool updateBonesAndEffects);
1589
1590 MCAPI void setUpdateEffects(bool updateEffects);
1591#endif
1592
1593 MCAPI void setVariant(int value);
1594
1595 MCAPI void setVelocity(::Vec3 const& vel);
1596
1597 MCAPI void setWalker(bool isWalker);
1598
1599 MCAPI void setYHeadRot(float yHeadRot);
1600
1601 MCAPI void setYHeadRotations(float yHeadRot, float oldYHeadRot);
1602
1603#ifdef LL_PLAT_C
1604 MCFOLD bool shouldAddEntityToRenderQueue() const;
1605#endif
1606
1607 MCAPI bool shouldOrphan(::BlockSource& source);
1608
1609 MCAPI bool shouldRender() const;
1610
1611 MCAPI bool shouldTick() const;
1612
1613#ifdef LL_PLAT_C
1614 MCAPI bool shouldUpdateBonesAndEffects() const;
1615#endif
1616
1617 MCFOLD bool shouldUpdateEffects() const;
1618
1619 MCAPI ::ItemActor* spawnAtLocation(::ItemStack const& item, float yOffs);
1620
1621 MCAPI void spawnEatParticles(::ItemStack const& itemInUse, int count);
1622
1623 MCAPI void spawnTrailBubbles();
1624
1625 MCAPI void
1626 stopRiding(bool exitFromPassenger, bool actorIsBeingDestroyed, bool switchingVehicles, bool isBeingTeleported);
1627
1628 MCAPI void synchronousSetSize(float w, float h);
1629
1630 MCAPI void teleportPassengersTo(::Vec3 const& pos, int cause, int entityType);
1631
1632 MCAPI void thawFreezeEffect();
1633
1634 MCAPI bool tick(::BlockSource& region);
1635
1636 MCAPI void tickBlockDamage();
1637
1638 MCAPI void tickLeash();
1639
1640 MCAPI void transferTickingArea(::Dimension const& toDimension);
1641
1642 MCAPI void triggerActorRemovedEvent();
1643
1644 MCAPI ::std::vector<::ItemDescriptor> const* tryGetEquippableSlotAllowedItems(int slotNumber) const;
1645
1646 MCAPI ::std::optional<int> tryGetEquippableSlotForItem(::ItemDescriptor item) const;
1647
1648 MCAPI bool tryTeleportTo(::Vec3 const& pos, bool landOnBlock, bool avoidLiquid, int cause, int entityType);
1649
1650 MCAPI void updateAnimationComponentOnServer();
1651
1652 MCAPI void updateDescription();
1653
1654 MCAPI void updateDimensionChunkMove();
1655
1656 MCAPI void updateInsideBlock();
1657
1658 MCAPI void updateInvisibilityStatus();
1659
1660 MCAPI void updateMolangVariables(::RenderParams& renderParams);
1661
1662 MCAPI void updateTickingData();
1663
1664 MCAPI void updateWaterState();
1665
1666 MCFOLD bool wasHurt();
1667
1668 MCAPI bool wasLastHitByPlayer();
1669
1670 MCAPI void wobble();
1671 // NOLINTEND
1672
1673public:
1674 // static functions
1675 // NOLINTBEGIN
1676 MCAPI static void _moveRelative(::Vec3& posDelta, float yRotDegrees, float xa, float ya, float za, float speed);
1677
1678 MCAPI static ::Vec3 buildForward(::Vec2 rotation);
1679
1680#ifdef LL_PLAT_C
1681 MCAPI static int getActiveEffectCount(::std::vector<::MobEffectInstance> const& effects);
1682#endif
1683
1684 MCAPI static ::BlockPos getBlockPosCurrentlyStandingOn(
1685 ::Vec3 const& pos,
1686 ::AABB const& aabb,
1687 ::IConstBlockSource const& region,
1689 );
1690
1691 MCAPI static ::BlockPos getBlockPosCurrentlyStandingOn(
1692 ::Vec3 const& pos,
1693 ::AABB const& aabb,
1694 ::IConstBlockSource const& region,
1695 float ignoreGapBelow,
1697 );
1698
1699 MCAPI static ::std::vector<::BlockPos> getBlocksCurrentlyStandingOn(
1700 ::AABB const& aabb,
1701 ::IConstBlockSource const& region,
1702 float ignoreGapBelow,
1704 );
1705
1706 MCAPI static ::Vec3 getCenter(
1707 float a,
1708 ::AABBShapeComponent const& aabbShapeComponent,
1709 ::StateVectorComponent const& stateVectorComponent,
1710 float heightOffset
1711 );
1712
1713 MCAPI static ::MobEffectInstance const*
1714 getEffect(::std::vector<::MobEffectInstance> const& effects, ::MobEffect const& effect);
1715
1716 MCAPI static ::MobEffectInstance const* getEffect(::std::vector<::MobEffectInstance> const& effects, uint effectId);
1717
1718 MCAPI static ::Vec3 getInterpolatedPosition(float a, ::StateVectorComponent const& stateVectorComponent);
1719
1720#ifdef LL_PLAT_C
1721 MCAPI static ::Vec3 getInterpolatedPosition(
1722 float a,
1723 ::StateVectorComponent const& stateVectorComponent,
1724 ::DynamicRenderOffsetComponent const* dynamicRenderOffsets
1725 );
1726#endif
1727
1728 MCAPI static ::AABB getLiquidAABB(::AABB const& aabb, ::SharedTypes::v1_26_20::MaterialType liquidType);
1729
1730 MCAPI static float getLiquidFlowStrength(::SharedTypes::v1_26_20::MaterialType liquidType);
1731
1732 MCAPI static ::Vec3 getViewVector(::ActorRotationComponent const& actorRotation, float a);
1733
1734 MCAPI static ::Vec3 getViewVector(::Vec2 const& prevRot, ::Vec2 const& rot, float a);
1735
1736 MCAPI static bool isImmobile(::EntityContext const& entity);
1737
1738 MCAPI static bool isInLiquid(
1739 ::SharedTypes::v1_26_20::MaterialType liquidType,
1740 ::IConstBlockSource const& region,
1741 ::AABB const& mainAABB,
1742 ::std::vector<::AABB> const& subAABBs
1743 );
1744
1745 MCFOLD static ::Actor const* tryGetFromComponent(::ActorOwnerComponent const& component, bool includeRemoved);
1746
1747 MCFOLD static ::Actor* tryGetFromComponent(::ActorOwnerComponent& component, bool includeRemoved);
1748
1749 MCFOLD static ::Actor const* tryGetFromEntity(::EntityContext const& entity, bool includeRemoved);
1750
1751 MCAPI static ::Actor* tryGetFromEntity(::StackRefResult<::EntityContext> entity, bool includeRemoved);
1752
1753 MCAPI static ::Actor*
1754 tryGetFromEntity(::StrictEntityContext const& entity, ::EntityRegistry& registry, bool includeRemoved);
1755 // NOLINTEND
1756
1757public:
1758 // constructor thunks
1759 // NOLINTBEGIN
1760 MCAPI void* $ctor(::ILevel& level, ::EntityContext& entityContext);
1761
1762 MCAPI void* $ctor(
1763 ::ActorDefinitionGroup* definitions,
1764 ::ActorDefinitionIdentifier const& definitionName,
1765 ::EntityContext& entityContext
1766 );
1767 // NOLINTEND
1768
1769public:
1770 // destructor thunk
1771 // NOLINTBEGIN
1772 MCAPI void $dtor();
1773 // NOLINTEND
1774
1775public:
1776 // virtual function thunks
1777 // NOLINTBEGIN
1778 MCAPI void $outOfWorld();
1779
1780 MCFOLD void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
1781
1782 MCAPI void $reloadHardcodedClient(::ActorInitializationMethod method);
1783
1784 MCAPI void $initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const& params);
1785
1786 MCAPI void $reloadComponents(::ActorInitializationMethod, ::VariantParameterList const&);
1787
1788 MCAPI void $_serverInitItemStackIds();
1789
1790 MCAPI void $_doInitialMove();
1791
1792 MCAPI bool $hasComponent(::HashedString const& name) const;
1793
1794 MCFOLD void $resetUserPos(::ActorResetRule resetRule);
1795
1796 MCAPI ::ActorType $getOwnerEntityType();
1797
1798 MCAPI void $remove();
1799
1800 MCAPI ::Vec3 $getFiringPos() const;
1801
1802 MCAPI float $getInterpolatedBodyRot(float a) const;
1803
1804 MCFOLD float $getInterpolatedHeadRot(float a) const;
1805
1806 MCFOLD float $getInterpolatedBodyYaw(float a) const;
1807
1808 MCAPI float $getYawSpeedInDegreesPerSecond() const;
1809
1810 MCFOLD ::Vec3 $getInterpolatedRidingOffset(float, int const) const;
1811
1812 MCAPI bool $isFireImmune() const;
1813
1814 MCAPI void $blockedByShield(::ActorDamageSource const& source, ::Actor& blocker);
1815
1816 MCAPI bool $canDisableShield();
1817
1818 MCAPI void
1819 $teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int sourceEntityType, bool keepVelocity);
1820
1821 MCFOLD void $lerpMotion(::Vec3 const& delta);
1822
1823 MCAPI ::std::unique_ptr<::Packet> $tryCreateAddActorPacket();
1824
1825 MCAPI void $normalTick();
1826
1827 MCAPI void $baseTick();
1828
1829 MCAPI void $passengerTick();
1830
1831 MCAPI bool $startRiding(::Actor& vehicle, bool forceRiding);
1832
1833 MCAPI void $addPassenger(::Actor& passenger);
1834
1835 MCAPI ::std::string $getExitTip(::std::string const& kind, ::InputMode mode, ::NewInteractionModel scheme) const;
1836
1837 MCAPI ::std::string $getEntityLocNameString() const;
1838
1839 MCAPI bool $isInvisible() const;
1840
1841 MCAPI bool $canShowNameTag() const;
1842
1843 MCFOLD ::mce::Color $getNameTagTextColor() const;
1844
1845 MCAPI float $getShadowRadius() const;
1846
1847 MCAPI ::Vec3 $getHeadLookVector(float a) const;
1848
1849 MCFOLD bool $canInteractWithOtherEntitiesInGame() const;
1850
1851 MCAPI float $getBrightness(float a, ::IConstBlockSource const& region) const;
1852
1853 MCFOLD void $playerTouch(::Player& player);
1854
1855 MCAPI bool $isImmobile() const;
1856
1857 MCAPI bool $isSilentObserver() const;
1858
1859 MCFOLD bool $isSleeping() const;
1860
1861 MCFOLD void $setSleeping(bool val);
1862
1863 MCAPI void $setSneaking(bool value);
1864
1865 MCFOLD bool $isBlocking() const;
1866
1867 MCFOLD bool $isDamageBlocked(::ActorDamageSource const& source) const;
1868
1869 MCAPI bool $isAlive() const;
1870
1871 MCAPI bool $isOnFire() const;
1872
1873 MCFOLD bool $isSurfaceMob() const;
1874
1875 MCFOLD bool $isTargetable() const;
1876
1877 MCAPI void $setTarget(::Actor* entity);
1878
1879 MCFOLD bool $isValidTarget(::Actor*) const;
1880
1881 MCAPI ::ActorHurtResult $attack(::Actor& target, ::SharedTypes::Legacy::ActorDamageCause const& cause);
1882
1883 MCAPI void $performRangedAttack(::Actor& target, float);
1884
1885 MCAPI void $setOwner(::ActorUniqueID const ownerId);
1886
1887 MCAPI void $setSitting(bool value);
1888
1889 MCFOLD void $onTame();
1890
1891 MCFOLD void $onFailedTame();
1892
1893 MCAPI void $setStanding(bool value);
1894
1895 MCAPI bool $canPowerJump() const;
1896
1897 MCAPI bool $isEnchanted() const;
1898
1899 MCAPI void $playAmbientSound();
1900
1901 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getAmbientSound() const;
1902
1903 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
1904
1905 MCAPI ::SharedTypes::Legacy::ActorDamageCause $getBlockDamageCause(::Block const& block) const;
1906
1907 MCAPI ::ActorHurtResult $doFireHurt(int amount);
1908
1909 MCAPI void $onLightningHit();
1910
1911 MCAPI void $feed(int itemId);
1912
1913 MCAPI void $handleEntityEvent(::ActorEvent eventId, int data);
1914
1915 MCFOLD ::HashedString const& $getActorRendererId() const;
1916
1917 MCAPI void $despawn();
1918
1919 MCAPI void $setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item);
1920
1921 MCFOLD ::ArmorMaterialType $getArmorMaterialTypeInSlot(::SharedTypes::Legacy::ArmorSlot slot) const;
1922
1923 MCFOLD int $getArmorTextureIndexInSlot(::SharedTypes::Legacy::ArmorSlot slot) const;
1924
1925 MCFOLD float $getArmorColorInSlot(::SharedTypes::Legacy::ArmorSlot slot, int channelRGBA) const;
1926
1927 MCFOLD void $setEquippedSlot(::SharedTypes::Legacy::EquipmentSlot slot, ::ItemStack const& item);
1928
1929 MCAPI void $setCarriedItem(::ItemStack const& item);
1930
1931 MCAPI ::ItemStack const& $getCarriedItem() const;
1932
1933 MCAPI void $setOffhandSlot(::ItemStack const& item);
1934
1935 MCAPI ::ItemStack const& $getEquippedTotem() const;
1936
1937 MCAPI bool $consumeTotem();
1938
1939 MCAPI bool $load(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
1940
1941 MCFOLD ::HashedString const& $queryEntityRenderer() const;
1942
1943 MCFOLD ::ActorUniqueID $getSourceUniqueID() const;
1944
1945 MCFOLD bool $canFreeze() const;
1946
1947 MCAPI ::AABB $getLiquidAABB(::SharedTypes::v1_26_20::MaterialType const liquidType) const;
1948
1949 MCAPI void $handleInsidePortal(::BlockPos const& portalPos);
1950
1951 MCAPI bool $canChangeDimensionsUsingPortal() const;
1952
1953 MCAPI void $changeDimension(::DimensionType toId);
1954
1955 MCFOLD void $changeDimension(::ChangeDimensionPacket const& packet);
1956
1957 MCFOLD ::ActorUniqueID $getControllingPlayer() const;
1958
1959 MCFOLD float $causeFallDamageToActor(float distance, float multiplier, ::ActorDamageSource source);
1960
1961 MCAPI void $onSynchedDataUpdate(int dataId);
1962
1963 MCAPI bool $canAddPassenger(::Actor& passenger) const;
1964
1965 MCFOLD bool $canPickupItem(::ItemStack const& item) const;
1966
1967 MCFOLD bool $canBePulledIntoVehicle() const;
1968
1969 MCFOLD bool $inCaravan() const;
1970
1971 MCAPI void $sendMotionPacketIfNeeded();
1972
1973 MCFOLD bool $canSynchronizeNewEntity() const;
1974
1975 MCAPI void $startSwimming();
1976
1977 MCAPI void $stopSwimming();
1978
1979 MCFOLD void $buildDebugInfo(::std::string& out) const;
1980
1981 MCAPI ::CommandPermissionLevel $getCommandPermissionLevel() const;
1982
1983 MCFOLD int $getDeathTime() const;
1984
1985 MCAPI bool $canBeAffected(uint id) const;
1986
1987 MCAPI bool $canBeAffectedByArrow(::MobEffectInstance const& effect) const;
1988
1989 MCAPI void $onEffectRemoved(::MobEffectInstance& effect);
1990
1991 MCAPI bool $canObstructSpawningAndBlockPlacement() const;
1992
1993 MCAPI ::AnimationComponent& $getAnimationComponent();
1994
1995 MCAPI void $openContainerComponent(::Player& player);
1996
1997 MCFOLD bool $swing(::ActorSwingSource swingSource);
1998
1999 MCAPI void $useItem(::ItemStackBase& item, ::ItemUseMethod itemUseMethod, bool consumeItem);
2000
2001 MCAPI void $getDebugText(::std::vector<::std::string>& outputInfo);
2002
2003 MCAPI float $getMapDecorationRotation() const;
2004
2005 MCAPI float $getPassengerYRotation(::Actor const& passenger) const;
2006
2007 MCAPI bool $add(::ItemStack& item);
2008
2009 MCAPI bool $drop(::ItemStack const& item, bool const randomly);
2010
2011 MCAPI ::InteractionResult
2012 $getInteraction(::Player& player, ::ActorInteraction& interaction, ::Vec3 const& location);
2013
2014 MCFOLD bool $canDestroyBlock(::Block const& block) const;
2015
2016 MCFOLD void $setAuxValue(int aux);
2017
2018 MCFOLD void $renderDebugServerState(::IOptionsReader const& options);
2019
2020 MCAPI void $kill();
2021
2022 MCAPI void $die(::ActorDamageSource const& source);
2023
2024 MCAPI bool $shouldDropDeathLoot() const;
2025
2026 MCAPI void $applySnapshot(
2027 ::EntityContext const& snapshotEntity,
2028 ::MovementDataExtractionUtility::SnapshotAccessor const& originalSnapshotEntity
2029 );
2030
2031 MCFOLD void $onPush(::Actor& source);
2032
2033 MCFOLD ::std::optional<::BlockPos> $getLastDeathPos() const;
2034
2035 MCFOLD ::std::optional<::DimensionType> $getLastDeathDimension() const;
2036
2037 MCFOLD bool $hasDiedBefore() const;
2038
2039 MCFOLD void $doEnterWaterSplashEffect();
2040
2041 MCFOLD void $doExitWaterSplashEffect();
2042
2043 MCAPI void $doWaterSplashEffect();
2044
2045 MCAPI bool $_shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot, ::ItemStack const& item) const;
2046
2047 MCAPI bool $_shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item) const;
2048
2049 MCAPI ::ActorHurtResult $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
2050
2051 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
2052
2053 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
2054
2055
2056 // NOLINTEND
2057
2058public:
2059 // vftables
2060 // NOLINTBEGIN
2061 MCAPI static void** $vftable();
2062 // NOLINTEND
2063};
Definition AABB.h:18
Definition ActionEvent.h:8
Definition ActionQueue.h:8
Definition ActorDamageSource.h:18
Definition ActorDefinitionDescriptor.h:74
Definition ActorDefinitionDiffList.h:15
Definition ActorDefinitionGroup.h:37
Definition ActorHurtResult.h:5
Definition ActorInteraction.h:8
Definition ActorOwnerComponent.h:10
Definition ActorRuntimeID.h:5
Definition AnimationComponent.h:37
Definition AttributeInstanceConstRef.h:13
Definition Attribute.h:9
Definition BaseAttributeMap.h:21
Definition RedactableString.h:10
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition ChangeDimensionPacket.h:19
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition Dimension.h:89
Definition DynamicProperties.h:14
Definition EntityContext.h:17
Definition EntityRegistry.h:11
Definition FishingHook.h:22
Definition GameEvent.h:9
Definition GetCollisionShapeInterface.h:13
Definition HashedString.h:5
Definition HitResult.h:19
Definition IConstBlockSource.h:24
Definition ILevel.h:219
Definition IOptionsReader.h:5
Definition ITickingArea.h:25
Definition InteractionResult.h:5
Definition ItemActor.h:31
Definition ItemDescriptor.h:25
Definition ItemStackBase.h:52
Definition ItemStack.h:35
Definition Level.h:255
Definition ListTag.h:21
Definition LootTable.h:15
Definition Matrix.h:10
Definition MerchantRecipeList.h:17
Definition MobEffectInstance.h:20
Definition MobEffect.h:26
Definition Mob.h:57
Definition ModelPartLocator.h:11
Definition SnapshotAccessor.h:12
Definition Packet.h:31
Definition Player.h:137
Definition Random.h:10
Definition RenderParams.h:30
Definition RideableComponent.h:20
Definition RopeSystem.h:18
Definition SpatialActorNetworkData.h:16
Definition StackRefResult.h:7
Definition StrictEntityContext.h:14
Definition UpdateEquipPacket.h:19
Definition UpdateTradePacket.h:19
Definition Vec2.h:5
Definition Vec3.h:10
Definition WeakRef.h:8
Definition bitset.h:19
Definition optional_ref.h:10
Definition AABBShapeComponent.h:9
Definition ActorDefinitionIdentifier.h:15
Definition ActorRotationComponent.h:8
Definition ActorUniqueID.h:10
Definition DimensionType.h:5
Definition DistanceSortedActor.h:10
Definition DynamicRenderOffsetComponent.h:8
Definition EquipmentTable.h:12
Definition InterpolationPair.h:5
Definition MutableAttributeWithContext.h:15
Definition StateVectorComponent.h:8
Definition ValidMutableAttributeWithContext.h:15
Definition VariantParameterListConst.h:13
Definition VariantParameterList.h:14
Definition VehicleRootInfo.h:12