LeviLamina
Loading...
Searching...
No Matches
Actor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/AutomaticID.h"
7#include "mc/deps/core/utility/optional_ref.h"
8#include "mc/deps/game_refs/StackRefResult.h"
9#include "mc/deps/game_refs/WeakRef.h"
10#include "mc/deps/input/InputMode.h"
11#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
12#include "mc/deps/shared_types/legacy/actor/ActorDamageCause.h"
13#include "mc/deps/shared_types/legacy/actor/ActorLocation.h"
14#include "mc/deps/shared_types/legacy/actor/ArmorSlot.h"
15#include "mc/deps/shared_types/legacy/actor/PaletteColor.h"
16#include "mc/deps/shared_types/legacy/item/EquipmentSlot.h"
17#include "mc/input/NewInteractionModel.h"
18#include "mc/server/commands/CommandPermissionLevel.h"
19#include "mc/world/actor/ActorCategory.h"
20#include "mc/world/actor/ActorEvent.h"
21#include "mc/world/actor/ActorFlags.h"
22#include "mc/world/actor/ActorInitializationMethod.h"
23#include "mc/world/actor/ActorType.h"
24#include "mc/world/actor/ArmorMaterialType.h"
25#include "mc/world/actor/SpawnRuleEnum.h"
26#include "mc/world/actor/animation/AnimationComponentGroupType.h"
27#include "mc/world/item/HandSlot.h"
28#include "mc/world/item/ItemUseMethod.h"
29#include "mc/world/level/ShapeType.h"
30#include "mc/world/level/material/MaterialType.h"
31
32// auto generated forward declare list
33// clang-format off
34class AABB;
35class ActionEvent;
36class ActionQueue;
43class ActorRuntimeID;
47class Attribute;
50class Block;
51class BlockPos;
52class BlockSource;
54class CompoundTag;
55class DataLoadHelper;
56class Dimension;
58class EntityContext;
59class EntityRegistry;
60class GameEvent;
62class HashedString;
64class ILevel;
65class ItemActor;
66class ItemDescriptor;
67class ItemStack;
68class ItemStackBase;
69class ListTag;
70class LootTable;
72class Mob;
73class MobEffect;
76class Options;
77class Player;
78class Random;
79class RenderParams;
81class RopeSystem;
86class Vec2;
87class Vec3;
89struct ActorLink;
90struct ActorUniqueID;
93struct EquipmentTable;
97namespace Bedrock::Safety { class RedactableString; }
98namespace MovementDataExtractionUtility { class SnapshotAccessor; }
99namespace mce { class Color; }
100// clang-format on
101
102class Level;
103
104class Actor {
105public:
106 // Actor inner types define
107 using EntityBlockCollisionCallback =
108 ::std::function<void(::BlockSource&, ::Block const&, ::BlockPos const&, ::Actor&)>;
109
110public:
111 LLNDAPI class EntityContext& getEntityContext();
112 LLNDAPI class EntityContext const& getEntityContext() const;
113
114 LLAPI void refresh();
115
116 LLAPI optional_ref<Actor> clone(Vec3 const& pos, std::optional<DimensionType> dimId = std::nullopt) const;
117
118 LLNDAPI std::string const& getTypeName() const;
119
120 LLNDAPI class Vec3 getFeetPos() const;
121
122 LLNDAPI class Vec3 getHeadPos() const;
123
124 LLNDAPI class BlockPos getFeetBlockPos() const;
125
126 LLNDAPI bool isSimulatedPlayer() const;
127
128 LLNDAPI bool isOnGround() const;
129
130 LLAPI void setOnFire(int time, bool isEffect = true);
131 LLAPI void stopFire();
132
133 LLNDAPI float getPosDeltaPerSecLength() const;
134
135 LLAPI bool hurtByCause(
136 float damage,
137 ::SharedTypes::Legacy::ActorDamageCause cause = ::SharedTypes::Legacy::ActorDamageCause::Override,
138 optional_ref<Actor> attacker = std::nullopt
139 );
140
141 LLNDAPI class HitResult traceRay(
142 float tMax = 5.5f,
143 bool includeActor = true,
144 bool includeBlock = true,
145 std::function<bool(class BlockSource const&, class Block const&, bool)> const& blockCheckFunction =
146 [](auto&&...) -> bool { return true; }
147 ) const;
148
149 LLAPI void teleport(class Vec3 const& pos, DimensionType dimId, class Vec2 const& rotation);
150 LLAPI void teleport(class Vec3 const& pos, DimensionType dimId);
151
152 LLAPI void setName(std::string const& name);
153
154 LLNDAPI float evalMolang(std::string const& expression);
155
156 LLNDAPI const AABB& getAABB() const;
157
158 LLAPI static ::Actor* tryGetFromEntity(::EntityContext& entity, bool includeRemoved);
159
160 [[nodiscard]] Level& getLevel() const { return *reinterpret_cast<Level*>(mLevel); }
161
162public:
163 // member variables
164 // NOLINTBEGIN
165 ::ll::TypedStorage<8, 24, ::EntityContext> mEntityContext;
166 ::ll::TypedStorage<8, 72, ::VariantParameterList> mInitParams;
167 ::ll::TypedStorage<8, 32, ::std::string> mCustomInitEventName;
168 ::ll::TypedStorage<1, 1, ::ActorInitializationMethod> mInitMethod;
169 ::ll::TypedStorage<1, 1, bool> mForceInitMethodToSpawnOnReload;
170 ::ll::TypedStorage<1, 1, bool> mAdded;
171 ::ll::TypedStorage<8, 8, ::ActorDefinitionGroup*> mDefinitions;
172 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ActorDefinitionDescriptor>> mCurrentDescription;
173 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::RopeSystem>> mLeashRopeSystem;
174 ::ll::TypedStorage<8, 32, ::std::string> mAlias;
175 ::ll::TypedStorage<4, 68, ::std::optional<::glm::mat4x4>> mPreviousRenderTransform;
176 ::ll::TypedStorage<4, 4, int> mLastHurtByPlayerTime;
177 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::std::vector<::std::vector<::glm::mat4x4>>>>
178 mPreviousBoneMatrices;
179 ::ll::TypedStorage<8, 48, ::SynchedActorDataEntityWrapper> mEntityData;
180 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SpatialActorNetworkData>> mNetworkData;
181 ::ll::TypedStorage<4, 12, ::Vec3> mSentDelta;
182 ::ll::TypedStorage<4, 4, float> mScale;
183 ::ll::TypedStorage<4, 4, float> mScalePrev;
184 ::ll::TypedStorage<1, 1, bool> mIgnoreLighting;
185 ::ll::TypedStorage<1, 1, bool> mFilterLighting;
186 ::ll::TypedStorage<4, 4, float> mStepSoundVolume;
187 ::ll::TypedStorage<4, 4, float> mStepSoundPitch;
188 ::ll::TypedStorage<8, 8, ::AABB*> mLastHitBB;
189 ::ll::TypedStorage<8, 8, uint64> mNameTagHash;
190 ::ll::TypedStorage<4, 4, float> mShadowOffset;
191 ::ll::TypedStorage<4, 4, float> mPushthrough;
192 ::ll::TypedStorage<4, 4, int> mTickCount;
193 ::ll::TypedStorage<4, 4, int> mInvulnerableTime;
194 ::ll::TypedStorage<4, 4, int> mLastHealth;
195 ::ll::TypedStorage<1, 1, bool> mHurtMarked;
196 ::ll::TypedStorage<1, 1, bool> mWasHurtLastFrame;
197 ::ll::TypedStorage<1, 1, bool> mInvulnerable;
198 ::ll::TypedStorage<4, 4, int> mFlameTexFrameIndex;
199 ::ll::TypedStorage<4, 4, float> mFlameFrameIncrementTime;
200 ::ll::TypedStorage<1, 1, bool> mAlwaysFireImmune;
201 ::ll::TypedStorage<1, 1, bool> mInheritRotationWhenRiding;
202 ::ll::TypedStorage<1, 1, bool> mForcedLoading;
203 ::ll::TypedStorage<1, 1, bool> mForceSendMotionPacket;
204 ::ll::TypedStorage<1, 1, bool> mHighlightedThisFrame;
205 ::ll::TypedStorage<1, 1, bool> mInitialized;
206 ::ll::TypedStorage<1, 1, bool> mProcessedOnChunkDiscard;
207 ::ll::TypedStorage<4, 4, float> mSoundVolume;
208 ::ll::TypedStorage<4, 4, int> mShakeTime;
209 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLegacyUniqueID;
210 ::ll::TypedStorage<8, 16, ::WeakRef<::Dimension>> mDimension;
211 ::ll::TypedStorage<8, 8, ::ILevel*> mLevel;
212 ::ll::TypedStorage<8, 48, ::HashedString> mActorRendererId;
213 ::ll::TypedStorage<4, 4, ::ActorCategory> mCategories;
214 ::ll::TypedStorage<8, 32, ::BuiltInActorComponents> mBuiltInComponents;
215 ::ll::TypedStorage<8, 48, ::HashedString> mActorRendererIdThatAnimationComponentWasInitializedWith;
216 ::ll::TypedStorage<1, 1, bool> mChanged;
217 ::ll::TypedStorage<1, 1, bool> mRemoved;
218 ::ll::TypedStorage<1, 1, bool> mMovedToLimbo;
219 ::ll::TypedStorage<1, 1, bool> mMovedToUnloadedChunk;
220 ::ll::TypedStorage<1, 1, bool> mBlocksBuilding;
221 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mAnimationComponent;
222 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mUIAnimationComponent;
223 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mTargetId;
224 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mInLovePartner;
225 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CompoundTag>> mPersistingTradeOffers;
226 ::ll::TypedStorage<4, 4, int> mPersistingTradeRiches;
227 ::ll::TypedStorage<1, 1, bool> mPersistingTrade;
228 ::ll::TypedStorage<1, 1, bool> mEffectsDirty;
229 ::ll::TypedStorage<1, 1, bool> mLootDropped;
230 ::ll::TypedStorage<1, 1, bool> mLoadedFromNBTThisFrame;
231 ::ll::TypedStorage<4, 16, ::mce::Color> mHurtColor;
232 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ActorDefinitionDiffList>> mDefinitionList;
233 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CompoundTag>> mLoadedActorPropertyTag;
234 ::ll::TypedStorage<8, 16, ::ActorDefinitionPtr> mActorDefinitionPtr;
235 ::ll::TypedStorage<8, 32, ::std::string> mFilteredNameTag;
236 ::ll::TypedStorage<8, 24, ::ActorTerrainInterlockData> mTerrainInterlockData;
237 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastHurtMobId;
238 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastHurtByMobId;
239 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLastHurtByPlayerId;
240 ::ll::TypedStorage<8, 8, uint64> mLastHurtTimestamp;
241 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::ActorDamageCause> mLastHurtCause;
242 ::ll::TypedStorage<4, 4, float> mLastHurt;
243 ::ll::TypedStorage<4, 4, int> mLastHurtMobTimestamp;
244 ::ll::TypedStorage<4, 4, int> mLastHurtByMobTime;
245 ::ll::TypedStorage<4, 4, int> mLastHurtByMobTimestamp;
246 ::ll::TypedStorage<1, 1, bool> mIsPredictableProjectile;
247 ::ll::TypedStorage<1, 1, bool> mIsRenderingInUI;
248 ::ll::TypedStorage<1, 1, bool> mUpdateEffects;
249 ::ll::TypedStorage<1, 1, bool> mCanPickupItems;
250 ::ll::TypedStorage<1, 1, bool> mHasSetCanPickupItems;
251 ::ll::TypedStorage<1, 1, bool> mChainedDamageEffects;
252 ::ll::TypedStorage<4, 4, int> mAffectedByWaterBottleTicksToEffect;
253 ::ll::TypedStorage<4, 4, ::SpawnRuleEnum> mSpawnRulesEnum;
254 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ActionQueue>> mActionQueue;
255 ::ll::TypedStorage<8, 56, ::MolangVariableMap> mMolangVariables;
256 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mFishingHookID;
257 // NOLINTEND
258
259public:
260 // virtual functions
261 // NOLINTBEGIN
262 // vIndex: 0
263 virtual bool hasComponent(::HashedString const& name) const;
264
265 // vIndex: 1
266 virtual void outOfWorld();
267
268 // vIndex: 2
269 virtual void reloadHardcoded(::ActorInitializationMethod, ::VariantParameterList const&);
270
271 // vIndex: 3
272 virtual void reloadHardcodedClient(::ActorInitializationMethod);
273
274 // vIndex: 4
275 virtual void initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const&);
276
277 // vIndex: 5
278 virtual void reloadComponents(::ActorInitializationMethod, ::VariantParameterList const&);
279
280 // vIndex: 6
281 virtual void _serverInitItemStackIds();
282
283 // vIndex: 7
284 virtual void _doInitialMove();
285
286 // vIndex: 8
287 virtual ~Actor();
288
289 // vIndex: 9
290 virtual void resetUserPos(bool);
291
292 // vIndex: 10
293 virtual ::ActorType getOwnerEntityType();
294
295 // vIndex: 11
296 virtual void remove();
297
298 // vIndex: 12
299 virtual ::Vec3 getFiringPos() const;
300
301 // vIndex: 13
302 virtual float getInterpolatedBodyRot(float a = 0.0f) const;
303
304 // vIndex: 14
305 virtual float getInterpolatedHeadRot(float = 0.0f) const;
306
307 // vIndex: 15
308 virtual float getInterpolatedBodyYaw(float = 0.0f) const;
309
310 // vIndex: 16
311 virtual float getYawSpeedInDegreesPerSecond() const;
312
313 // vIndex: 17
314 virtual ::Vec3 getInterpolatedRidingOffset(float, int const) const;
315
316 // vIndex: 18
317 virtual bool isFireImmune() const;
318
319 // vIndex: 19
320 virtual void blockedByShield(::ActorDamageSource const& source, ::Actor& blocker);
321
322 // vIndex: 20
323 virtual bool canDisableShield();
324
325 // vIndex: 21
326 virtual void teleportTo(::Vec3 const& pos, bool shouldStopRiding, int, int, bool keepVelocity);
327
328 // vIndex: 22
329 virtual void lerpMotion(::Vec3 const& delta);
330
331 // vIndex: 23
332 virtual ::std::unique_ptr<::AddActorBasePacket> tryCreateAddActorPacket();
333
334 // vIndex: 24
335 virtual void normalTick();
336
337 // vIndex: 25
338 virtual void baseTick();
339
340 // vIndex: 26
341 virtual void passengerTick();
342
343 // vIndex: 27
344 virtual bool startRiding(::Actor& vehicle, bool forceRiding);
345
346 // vIndex: 28
347 virtual void addPassenger(::Actor& passenger);
348
349 // vIndex: 29
350 virtual ::std::string getExitTip(::std::string const& kind, ::InputMode mode, ::NewInteractionModel scheme) const;
351
352 // vIndex: 30
353 virtual ::std::string getEntityLocNameString() const;
354
355 // vIndex: 31
356 virtual bool isInvisible() const;
357
358 // vIndex: 32
359 virtual bool canShowNameTag() const;
360
361 // vIndex: 33
362 virtual ::std::string getFormattedNameTag() const;
363
364 // vIndex: 34
365 virtual ::mce::Color getNameTagTextColor() const;
366
367 // vIndex: 35
368 virtual float getShadowRadius() const;
369
370 // vIndex: 36
371 virtual ::Vec3 getHeadLookVector(float a = 0.0f) const;
372
373 // vIndex: 37
374 virtual bool canInteractWithOtherEntitiesInGame() const;
375
376 // vIndex: 38
377 virtual float getBrightness(float a, ::IConstBlockSource const& region) const;
378
379 // vIndex: 39
380 virtual void playerTouch(::Player&);
381
382 // vIndex: 40
383 virtual bool isImmobile() const;
384
385 // vIndex: 41
386 virtual bool isSilentObserver() const;
387
388 // vIndex: 42
389 virtual bool isSleeping() const;
390
391 // vIndex: 43
392 virtual void setSleeping(bool);
393
394 // vIndex: 44
395 virtual void setSneaking(bool value);
396
397 // vIndex: 45
398 virtual bool isBlocking() const;
399
400 // vIndex: 46
401 virtual bool isDamageBlocked(::ActorDamageSource const&) const;
402
403 // vIndex: 47
404 virtual bool isAlive() const;
405
406 // vIndex: 48
407 virtual bool isOnFire() const;
408
409 // vIndex: 49
410 virtual bool isSurfaceMob() const;
411
412 // vIndex: 50
413 virtual bool isTargetable() const;
414
415 // vIndex: 51
416 virtual void setTarget(::Actor* entity);
417
418 // vIndex: 52
419 virtual bool isValidTarget(::Actor*) const;
420
421 // vIndex: 53
422 virtual bool attack(::Actor&, ::SharedTypes::Legacy::ActorDamageCause const&);
423
424 // vIndex: 54
425 virtual void performRangedAttack(::Actor& target, float);
426
427 // vIndex: 55
428 virtual void setOwner(::ActorUniqueID const ownerId);
429
430 // vIndex: 56
431 virtual void setSitting(bool value);
432
433 // vIndex: 57
434 virtual void onTame();
435
436 // vIndex: 58
437 virtual void onFailedTame();
438
439 // vIndex: 59
440 virtual void setStanding(bool value);
441
442 // vIndex: 60
443 virtual bool canPowerJump() const;
444
445 // vIndex: 61
446 virtual bool isEnchanted() const;
447
448 // vIndex: 62
449 virtual void playAmbientSound();
450
451 // vIndex: 63
452 virtual ::SharedTypes::Legacy::LevelSoundEvent getAmbientSound() const;
453
454 // vIndex: 64
455 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const;
456
457 // vIndex: 65
458 virtual ::SharedTypes::Legacy::ActorDamageCause getBlockDamageCause(::Block const&) const;
459
460 // vIndex: 66
461 virtual bool doFireHurt(int amount);
462
463 // vIndex: 67
464 virtual void onLightningHit();
465
466 // vIndex: 68
467 virtual void feed(int itemId);
468
469 // vIndex: 69
470 virtual void handleEntityEvent(::ActorEvent eventId, int data);
471
472 // vIndex: 70
473 virtual ::HashedString const& getActorRendererId() const;
474
475 // vIndex: 71
476 virtual void despawn();
477
478 // vIndex: 72
479 virtual void setArmor(::SharedTypes::Legacy::ArmorSlot, ::ItemStack const&);
480
481 // vIndex: 73
482 virtual ::ArmorMaterialType getArmorMaterialTypeInSlot(::SharedTypes::Legacy::ArmorSlot) const;
483
484 // vIndex: 74
485 virtual int getArmorTextureIndexInSlot(::SharedTypes::Legacy::ArmorSlot) const;
486
487 // vIndex: 75
488 virtual float getArmorColorInSlot(::SharedTypes::Legacy::ArmorSlot, int) const;
489
490 // vIndex: 76
491 virtual void setEquippedSlot(::SharedTypes::Legacy::EquipmentSlot, ::ItemStack const&);
492
493 // vIndex: 77
494 virtual void setCarriedItem(::ItemStack const& item);
495
496 // vIndex: 78
497 virtual ::ItemStack const& getCarriedItem() const;
498
499 // vIndex: 79
500 virtual void setOffhandSlot(::ItemStack const& item);
501
502 // vIndex: 80
503 virtual ::ItemStack const& getEquippedTotem() const;
504
505 // vIndex: 81
506 virtual bool consumeTotem();
507
508 // vIndex: 82
509 virtual bool load(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
510
511 // vIndex: 83
512 virtual ::HashedString const& queryEntityRenderer() const;
513
514 // vIndex: 84
515 virtual ::ActorUniqueID getSourceUniqueID() const;
516
517 // vIndex: 85
518 virtual bool canFreeze() const;
519
520 // vIndex: 86
521 virtual ::AABB getLiquidAABB(::MaterialType const) const;
522
523 // vIndex: 87
524 virtual void handleInsidePortal(::BlockPos const& portalPos);
525
526 // vIndex: 88
527 virtual bool canChangeDimensionsUsingPortal() const;
528
529 // vIndex: 90
530 virtual void changeDimension(::DimensionType toId);
531
532 // vIndex: 89
533 virtual void changeDimension(::ChangeDimensionPacket const&);
534
535 // vIndex: 91
536 virtual ::ActorUniqueID getControllingPlayer() const;
537
538 // vIndex: 92
539 virtual float causeFallDamageToActor(float, float, ::ActorDamageSource);
540
541 // vIndex: 93
542 virtual void onSynchedDataUpdate(int dataId);
543
544 // vIndex: 94
545 virtual bool canAddPassenger(::Actor& passenger) const;
546
547 // vIndex: 95
548 virtual bool canPickupItem(::ItemStack const&) const;
549
550 // vIndex: 96
551 virtual bool canBePulledIntoVehicle() const;
552
553 // vIndex: 97
554 virtual bool inCaravan() const;
555
556 // vIndex: 98
557 virtual void sendMotionPacketIfNeeded(::PlayerMovementSettings const& playerMovementSettings);
558
559 // vIndex: 99
560 virtual bool canSynchronizeNewEntity() const;
561
562 // vIndex: 100
563 virtual void startSwimming();
564
565 // vIndex: 101
566 virtual void stopSwimming();
567
568 // vIndex: 102
569 virtual void buildDebugInfo(::std::string&) const;
570
571 // vIndex: 103
572 virtual ::CommandPermissionLevel getCommandPermissionLevel() const;
573
574 // vIndex: 104
575 virtual int getDeathTime() const;
576
577 // vIndex: 105
578 virtual bool canBeAffected(uint id) const;
579
580 // vIndex: 106
581 virtual bool canBeAffectedByArrow(::MobEffectInstance const& effect) const;
582
583 // vIndex: 107
584 virtual void onEffectRemoved(::MobEffectInstance& effect);
585
586 // vIndex: 108
587 virtual bool canObstructSpawningAndBlockPlacement() const;
588
589 // vIndex: 109
590 virtual ::AnimationComponent& getAnimationComponent();
591
592 // vIndex: 110
593 virtual void openContainerComponent(::Player& player);
594
595 // vIndex: 111
596 virtual void swing();
597
598 // vIndex: 112
599 virtual void useItem(::ItemStackBase& item, ::ItemUseMethod itemUseMethod, bool consumeItem);
600
601 // vIndex: 113
602 virtual void getDebugText(::std::vector<::std::string>& outputInfo);
603
604 // vIndex: 114
605 virtual float getMapDecorationRotation() const;
606
607 // vIndex: 115
608 virtual float getPassengerYRotation(::Actor const& passenger) const;
609
610 // vIndex: 116
611 virtual bool add(::ItemStack& item);
612
613 // vIndex: 117
614 virtual bool drop(::ItemStack const& item, bool const randomly);
615
616 // vIndex: 118
617 virtual bool getInteraction(::Player& player, ::ActorInteraction& interaction, ::Vec3 const&);
618
619 // vIndex: 119
620 virtual bool canDestroyBlock(::Block const&) const;
621
622 // vIndex: 120
623 virtual void setAuxValue(int);
624
625 // vIndex: 121
626 virtual void renderDebugServerState(::Options const&);
627
628 // vIndex: 122
629 virtual void kill();
630
631 // vIndex: 123
632 virtual void die(::ActorDamageSource const& source);
633
634 // vIndex: 124
635 virtual bool shouldDropDeathLoot() const;
636
637 // vIndex: 125
638 virtual void applySnapshot(
639 ::EntityContext const& snapshotEntity,
640 ::MovementDataExtractionUtility::SnapshotAccessor const& originalSnapshotEntity
641 );
642
643 // vIndex: 126
644 virtual void onPush(::Actor&);
645
646 // vIndex: 127
647 virtual ::std::optional<::BlockPos> getLastDeathPos() const;
648
649 // vIndex: 128
650 virtual ::std::optional<::DimensionType> getLastDeathDimension() const;
651
652 // vIndex: 129
653 virtual bool hasDiedBefore() const;
654
655 // vIndex: 130
656 virtual void doEnterWaterSplashEffect();
657
658 // vIndex: 131
659 virtual void doExitWaterSplashEffect();
660
661 // vIndex: 132
662 virtual void doWaterSplashEffect();
663
664 // vIndex: 133
665 virtual bool _shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot, ::ItemStack const& item) const;
666
667 // vIndex: 134
668 virtual bool _shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot, ::ItemStack const&) const;
669
670 // vIndex: 135
671 virtual bool _hurt(::ActorDamageSource const& source, float damage, bool, bool);
672
673 // vIndex: 136
674 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
675
676 // vIndex: 137
677 virtual void addAdditionalSaveData(::CompoundTag& tag) const;
678 // NOLINTEND
679
680public:
681 // member functions
682 // NOLINTBEGIN
683 MCAPI Actor(::ILevel& level, ::EntityContext& entityContext);
684
685 MCAPI Actor(
686 ::ActorDefinitionGroup* definitions,
687 ::ActorDefinitionIdentifier const& definitionName,
688 ::EntityContext& entityContext
689 );
690
691 MCAPI ::BuiltInActorComponents _addActorBuiltInComponents();
692
693 MCAPI void _addActorNonBuiltInComponents();
694
695 MCAPI ::ItemActor const* _drop(::ItemStack const& item, bool randomly);
696
697 MCAPI ::std::vector<::MobEffectInstance>& _getAllEffectsNonConst();
698
699 MCAPI ::AnimationComponent& _getAnimationComponent(
700 ::std::shared_ptr<::AnimationComponent>& animationComponent,
701 ::AnimationComponentGroupType group
702 );
703
704 MCAPI void _initAliasProperties();
705
706 MCAPI void _initializeLeashRopeSystem(::Actor* holder);
707
708 MCAPI bool _isHeadInWater() const;
709
710 MCAPI bool _isItemStackNetManagerEnabled() const;
711
712 MCAPI void _sendDirtyActorData();
713
714 MCAPI void _serializeComponents(::CompoundTag& tag) const;
715
716 MCAPI void _setDimensionTransitionComponent(::DimensionType fromId, ::DimensionType toId, int portalCooldown);
717
718 MCAPI void _setHandContainerItem(::ItemStack const& item, ::HandSlot handSlot);
719
720 MCAPI void _setHeightOffset(float heightOffset);
721
722 MCAPI void _setupServerAnimationComponent();
723
724 MCAPI void _syncTickCountIfAnimationComponentShared();
725
726 MCAPI void _tryPlantWitherRose();
727
728 MCAPI void _updateComposition(bool reload);
729
730 MCAPI void addEffect(::MobEffectInstance const& effect);
731
732 MCAPI bool addTag(::std::string const& tag);
733
734 MCAPI void buildDebugGroupInfo(::std::string& out) const;
735
736 MCAPI ::Vec3 buildForward() const;
737
738 MCAPI void burn(int dmg, bool bInFire);
739
740 MCAPI float calculateAttackDamage(::Actor& entity);
741
742 MCAPI bool canAttack(::Actor const& entity) const;
743
744 MCAPI bool canBeginOrContinueClimbingLadder() const;
745
746 MCAPI bool canCurrentlySwim() const;
747
748 MCAPI bool canFly() const;
749
750 MCAPI bool canReceiveMobEffectsFromGameplay() const;
751
752 MCAPI bool canSee(::Actor const& target, ::ShapeType obstructionType) const;
753
754 MCAPI bool canSee(::Vec3 const& targetPos, ::ShapeType obstructionType) const;
755
756 MCAPI bool canSeeDaylight() const;
757
758 MCAPI void checkFallDamage(float ya, bool onGround, bool recheckLiquid);
759
760 MCAPI void chorusFruitTeleport(::Vec3 const& range);
761
762 MCAPI bool closerThan(::Actor const& e, float distance) const;
763
764 MCAPI bool closerThan(::Actor const& e, float distanceXZ, float distanceY) const;
765
766 MCAPI void consumeItem(::ItemActor& itemActor, int count);
767
768 MCAPI ::UpdateEquipPacket createUpdateEquipPacket(int containerID);
769
770 MCAPI void deregisterTagsFromLevelCache();
771
772 MCAPI float distanceTo(::Actor const& e) const;
773
774 MCAPI float distanceTo(::Vec3 const& pos) const;
775
776 MCAPI float distanceToSqr(::Actor const& e) const;
777
778 MCAPI float distanceToSqr(::Vec3 const& pos) const;
779
780 MCAPI void dropLeash(bool createItemDrop, bool cutRope);
781
782 MCAPI void dropTowards(::ItemStack const& item, ::Vec3 towards);
783
784 MCAPI void equip(::EquipmentTable const& equipmentTable);
785
786 MCAPI void equip(::std::string const& lootTableFilePath);
787
788 MCAPI void equipFromEquipmentDefinition();
789
790 MCAPI float evaluateSeatRotation(::RideableComponent const& rideable, bool useVehicleRenderParams);
791
792 MCAPI void exitVehicle(bool exitFromPassenger, bool actorIsBeingDestroyed, bool wasEjectedByActivatorRail);
793
794 MCAPI ::std::vector<::DistanceSortedActor> fetchNearbyActorsSorted(::Vec3 const& distance, ::ActorType actorTypeId);
795
796 MCAPI void forEachLeashedActor(::std::function<void(::gsl::not_null<::Actor*>)> callback) const;
797
798 MCAPI ::Vec2 const& getAABBDim() const;
799
800 MCAPI ::ActorDefinitionIdentifier const& getActorIdentifier() const;
801
802 MCAPI ::ItemStack const& getArmor(::SharedTypes::Legacy::ArmorSlot slot) const;
803
804 MCAPI ::Vec3 getAttachPos(::SharedTypes::Legacy::ActorLocation location) const;
805
806 MCAPI ::Vec3 getAttachPos(::SharedTypes::Legacy::ActorLocation location, float alpha) const;
807
808 MCAPI ::AttributeInstance const& getAttribute(::Attribute const& attribute) const;
809
810 MCAPI ::gsl::not_null<::BaseAttributeMap const*> getAttributes() const;
811
812 MCAPI ::gsl::not_null<::BaseAttributeMap*> getAttributes();
813
814 MCAPI ::BlockPos getBlockPosCurrentlyStandingOn(::Actor const* actor) const;
815
816 MCAPI float getBrightness(float a = 0.0f) const;
817
818 MCAPI ::ItemStack const& getCarriedItemInSlotPreferredBy(::ItemStack const& item) const;
819
820 MCAPI int getChestSlots() const;
821
822 MCAPI ::SharedTypes::Legacy::PaletteColor getColor() const;
823
824 MCAPI ::SharedTypes::Legacy::PaletteColor getColor2() const;
825
826 MCAPI float getCurrentSwimAmount() const;
827
828 MCFOLD ::Dimension& getDimension() const;
829
830 MCFOLD ::BlockSource& getDimensionBlockSource() const;
831
832 MCFOLD ::BlockSource const& getDimensionBlockSourceConst() const;
833
834 MCFOLD ::Dimension const& getDimensionConst() const;
835
836 MCAPI ::DimensionType getDimensionId() const;
837
838 MCAPI ::MobEffectInstance const* getEffect(::MobEffect const& effect) const;
839
840 MCAPI ::StackRefResult<::EntityRegistry> getEntityRegistry();
841
842 MCAPI ::ActorType getEntityTypeId() const;
843
844 MCAPI int getEquipSlots() const;
845
846 MCAPI ::SharedTypes::Legacy::EquipmentSlot getEquipmentSlotForItem(::ItemStack const& item) const;
847
848 MCAPI ::ItemStack const& getEquippedSlot(::SharedTypes::Legacy::EquipmentSlot slot) const;
849
850 MCAPI ::Vec3 getEyePos() const;
851
852 MCAPI float getFallDistance() const;
853
854 MCAPI ::Actor* getFirstPassenger() const;
855
856 MCAPI ::Vec3 getInterpolatedPosition(float a = 0.0f) const;
857
858 MCAPI ::Vec3 getInterpolatedRidingPosition(float a = 0.0f) const;
859
860 MCAPI ::Vec2 getInterpolatedRotation(float a = 0.0f) const;
861
862 MCAPI ::ActorUniqueID getLeashHolder() const;
863
864 MCAPI ::std::vector<::ActorLink> getLinks() const;
865
866 MCAPI ::LootTable* getLootTable();
867
868 MCAPI int getMarkVariant() const;
869
870 MCAPI int getMaxHealth() const;
871
872 MCAPI ::MutableAttributeWithContext getMutableAttribute(::Attribute const& attribute);
873
874 MCAPI ::std::string const& getNameTag() const;
875
876 MCAPI ::ItemStack const& getOffhandSlot() const;
877
878 MCAPI int getOnDeathExperience();
879
880 MCAPI ::DynamicProperties& getOrAddDynamicProperties();
881
882 MCAPI ::ActorUniqueID const& getOrCreateUniqueID() const;
883
884 MCAPI ::Mob* getOwner() const;
885
886 MCFOLD ::ActorUniqueID const getOwnerId() const;
887
888 MCAPI int getPassengerIndex(::Actor const& passenger) const;
889
890 MCAPI ::std::unique_ptr<::CompoundTag> getPersistingTradeOffers();
891
892 MCAPI ::Player* getPlayerOwner() const;
893
894 MCAPI ::Vec3 const& getPosDelta() const;
895
896 MCAPI ::Vec3 const& getPosition() const;
897
898 MCAPI ::Random& getRandom() const;
899
900 MCAPI ::Bedrock::Safety::RedactableString getRedactableNameTag() const;
901
902 MCAPI float getRidingHeight() const;
903
904 MCAPI ::ActorRuntimeID getRuntimeID() const;
905
906 MCAPI bool getStatusFlag(::ActorFlags flag) const;
907
908 MCAPI int getStrength() const;
909
910 MCAPI int getStructuralIntegrity() const;
911
912 MCAPI float getSwimAmount(float a = 0.0f) const;
913
914 MCAPI ::Actor* getTarget() const;
915
916 MCAPI ::MerchantRecipeList* getTradeOffers();
917
918 MCAPI ::Player* getTradingPlayer() const;
919
920 MCFOLD int getVariant() const;
921
922 MCAPI ::Actor* getVehicle() const;
923
924 MCAPI ::Actor* getVehicleRoot() const;
925
926 MCFOLD ::Vec3 getViewVector(float a = 0.0f) const;
927
928 MCAPI ::WeakRef<::EntityContext> const getWeakEntity() const;
929
930 MCAPI void handleFallDamage(float fallDistance, float multiplier, ::ActorDamageSource source);
931
932 MCAPI void handleLeftoverFallDamage(float damage, ::ActorDamageSource source);
933
934 MCAPI bool hasCategory(::ActorCategory categories) const;
935
936 MCAPI bool hasDimension() const;
937
938 MCAPI bool hasEffect(::MobEffect const& effect) const;
939
940 MCAPI bool hasFamily(::HashedString const& family) const;
941
942 MCAPI bool hasPlayerPassenger() const;
943
944 MCAPI bool hasRuntimeID() const;
945
946 MCAPI bool hasSaddle() const;
947
948 MCAPI bool hasTag(::std::string const& tag) const;
949
950 MCAPI bool hasType(::ActorType types) const;
951
952 MCAPI bool hasUniqueID() const;
953
954 MCAPI void heal(int heal);
955
956 MCAPI bool hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
957
958 MCAPI bool inDownwardFlowingLiquid() const;
959
960 MCAPI void initActorProperties();
961
962 MCAPI void initParams(::RenderParams& params);
963
964 MCAPI bool isAdventure() const;
965
966 MCAPI bool isAttackableGamemode() const;
967
968 MCAPI bool isAutonomous() const;
969
970 MCAPI bool isBaby() const;
971
972 MCAPI bool isChested() const;
973
974 MCAPI bool isClientSide() const;
975
976 MCAPI bool isControlledByLocalInstance() const;
977
978 MCAPI bool isCreative() const;
979
980 MCAPI bool isDancing() const;
981
982 MCAPI bool isDead() const;
983
984 MCAPI bool isDoorOpener() const;
985
986 MCAPI bool isGlobal() const;
987
988 MCAPI bool isInClouds() const;
989
990 MCAPI bool isInLava() const;
991
992 MCAPI bool isInLove() const;
993
994 MCAPI bool isInPrecipitation() const;
995
996 MCAPI bool isInRain() const;
997
998 MCAPI bool isInSnow() const;
999
1000 MCAPI bool isInThunderstorm() const;
1001
1002 MCAPI bool isInWater() const;
1003
1004 MCAPI bool isInWaterOrRain() const;
1005
1006 MCAPI bool isInWorld() const;
1007
1008 MCAPI bool isJumping() const;
1009
1010 MCAPI bool isLeashed() const;
1011
1012 MCFOLD bool isLocalPlayer() const;
1013
1014 MCAPI bool isOverWater() const;
1015
1016 MCAPI bool isPassenger(::Actor const& passenger) const;
1017
1018 MCAPI bool isPersistent() const;
1019
1020 MCFOLD bool isPlayer() const;
1021
1022 MCAPI bool isRemotePlayer() const;
1023
1024 MCAPI bool isRiding() const;
1025
1026 MCAPI bool isRiding(::Actor* targetVehicle) const;
1027
1028 MCAPI bool isSitting() const;
1029
1030 MCAPI bool isSpectator() const;
1031
1032 MCAPI bool isSurvival() const;
1033
1034 MCAPI bool isSwimming() const;
1035
1036 MCAPI bool isTame() const;
1037
1038 MCAPI bool isTouchingDamageBlock() const;
1039
1040 MCAPI bool isTrading() const;
1041
1042 MCAPI bool isType(::ActorType type) const;
1043
1044 MCAPI bool isUnderLiquid(::MaterialType type) const;
1045
1046 MCAPI bool isWearingLeatherArmor() const;
1047
1048 MCAPI bool isWorldBuilder() const;
1049
1050 MCAPI void killed(::Actor& entity);
1051
1052 MCAPI void lerpTo(::Vec3 const& pos, ::Vec2 const& rot, int steps);
1053
1054 MCAPI void loadEntityFlags(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
1055
1056 MCAPI void
1057 loadLinks(::CompoundTag const& entityTag, ::std::vector<::ActorLink>& links, ::DataLoadHelper& dataLoadHelper);
1058
1059 MCAPI void move(::Vec3 const& posDelta);
1060
1061 MCAPI void moveTo(::Vec3 const& pos, ::Vec2 const& rot);
1062
1063 MCAPI bool onClimbableBlock() const;
1064
1065 MCAPI void onEffectAdded(::MobEffectInstance& effect);
1066
1067 MCAPI void onEffectUpdated(::MobEffectInstance& effect);
1068
1069 MCAPI void pickUpItem(::ItemActor& itemActor, int count);
1070
1071 MCAPI void playSound(::SharedTypes::Legacy::LevelSoundEvent type, ::Vec3 const& pos, int data);
1072
1073 MCAPI void
1074 playSynchronizedSound(::SharedTypes::Legacy::LevelSoundEvent type, ::Vec3 const& pos, int data, bool isGlobal);
1075
1076 MCAPI void positionAllPassengers();
1077
1078 MCAPI void positionPassenger(::Actor& passenger);
1079
1080 MCAPI void postGameEvent(::GameEvent const& gameEvent, ::Vec3 const& originPos, ::Block const* affectedBlock);
1081
1082 MCAPI void postSplashGameEvent();
1083
1084 MCAPI void pushBackActionEventToActionQueue(::ActionEvent actionEvent);
1085
1086 MCAPI void pushOutOfBlocks(::Vec3 const& vec);
1087
1088 MCAPI void queueBBUpdateFromDefinition();
1089
1090 MCAPI void refreshComponents();
1091
1092 MCAPI void reload();
1093
1094 MCAPI void removeAllEffects();
1095
1096 MCAPI void removeAllPassengers(bool beingDestroyed);
1097
1098 MCAPI void removeEffect(int effectId);
1099
1100 MCAPI bool removeTag(::std::string const& tag);
1101
1102 MCAPI bool save(::CompoundTag& entityTag) const;
1103
1104 MCAPI void saveEntityFlags(::CompoundTag& entityTag) const;
1105
1106 MCAPI ::std::unique_ptr<::ListTag> saveLinks() const;
1107
1108 MCAPI void savePersistingTrade(::std::unique_ptr<::CompoundTag> offersTag, int riches);
1109
1110 MCAPI void saveWithoutId(::CompoundTag& entityTag) const;
1111
1112 MCAPI void sendActorDefinitionEventTriggered(::std::string const& event);
1113
1114 MCAPI void serializationSetHealth(int newHealth);
1115
1116 MCAPI void setActorRendererId(::HashedString actorRendererId);
1117
1118 MCAPI void setAutonomous(bool g);
1119
1120 MCAPI void setBaseDefinition(::ActorDefinitionIdentifier const& sourceId, bool update, bool clearDefs);
1121
1122 MCAPI void setBlockTarget(::BlockPos const& target);
1123
1124 MCAPI void setColor(::SharedTypes::Legacy::PaletteColor color);
1125
1126 MCAPI void setColor2(::SharedTypes::Legacy::PaletteColor color);
1127
1128 MCAPI void setDimension(::WeakRef<::Dimension> weakDimension);
1129
1130 MCAPI void setInvisible(bool value);
1131
1132 MCAPI void setJumping(bool jump);
1133
1134 MCAPI void setLastHitBB(::Vec3 const& pos, ::Vec3 const& radius);
1135
1136 MCAPI void setLastHurtByMob(::Mob* mob);
1137
1138 MCAPI void setLastHurtByPlayer(::Player* player);
1139
1140 MCAPI void setLeashHolder(::ActorUniqueID leashHolder);
1141
1142 MCAPI void setLimitedLifetimeTicks(int lifetimeTicks);
1143
1144 MCAPI void setMarkVariant(int value);
1145
1146 MCAPI void setNameTag(::std::string const& name);
1147
1148 MCAPI void setPersistent();
1149
1150 MCAPI void setPos(::Vec3 const& pos);
1151
1152 MCAPI void setPreviousPosRot();
1153
1154 MCAPI void setRedactableNameTag(::Bedrock::Safety::RedactableString const& name);
1155
1156 MCAPI void setSkinID(int value);
1157
1158 MCAPI void setStatusFlag(::ActorFlags flag, bool value);
1159
1160 MCAPI void setStrength(int strength);
1161
1162 MCAPI void setStrengthMax(int strength);
1163
1164 MCFOLD void setVariant(int value);
1165
1166 MCAPI bool shouldOrphan(::BlockSource& source);
1167
1168 MCAPI bool shouldTick() const;
1169
1170 MCAPI ::ItemActor* spawnAtLocation(::ItemStack const& item, float yOffs);
1171
1172 MCAPI void spawnEatParticles(::ItemStack const& itemInUse, int count);
1173
1174 MCAPI void spawnTrailBubbles();
1175
1176 MCAPI void stopRiding(bool exitFromPassenger, bool actorIsBeingDestroyed, bool switchingVehicles);
1177
1178 MCAPI void synchronousSetSize(float w, float h);
1179
1180 MCAPI void teleportPassengersTo(::Vec3 const& pos, int entityType, int cause);
1181
1182 MCAPI bool tick(::BlockSource& region);
1183
1184 MCAPI void tickBlockDamage();
1185
1186 MCAPI void tickLeash();
1187
1188 MCAPI void triggerActorRemovedEvent();
1189
1190 MCAPI ::std::optional<int> tryGetEquippableSlotForItem(::ItemDescriptor item) const;
1191
1192 MCAPI bool tryTeleportTo(::Vec3 const& pos, bool landOnBlock, bool avoidLiquid, int cause, int entityType);
1193
1194 MCAPI void updateDescription();
1195
1196 MCAPI void updateInsideBlock();
1197
1198 MCAPI void updateInvisibilityStatus();
1199
1200 MCAPI void updateMolangVariables(::RenderParams& renderParams);
1201
1202 MCAPI void updateTickingData();
1203
1204 MCAPI void updateWaterState();
1205
1206 MCAPI void wobble();
1207 // NOLINTEND
1208
1209public:
1210 // static functions
1211 // NOLINTBEGIN
1212 MCAPI static void _moveRelative(::Vec3& posDelta, float yRotDegrees, float xa, float ya, float za, float speed);
1213
1214 MCAPI static ::BlockPos getBlockPosCurrentlyStandingOn(
1215 ::Vec3 const& pos,
1216 ::AABB box,
1217 ::IConstBlockSource const& region,
1219 );
1220
1221 MCAPI static ::MobEffectInstance const*
1222 getEffect(::std::vector<::MobEffectInstance> const& effects, ::MobEffect const& effect);
1223
1224 MCAPI static ::Vec2 getInterpolatedRotation(::Vec2 const& prevRot, ::Vec2 const& rot, float a);
1225
1226 MCAPI static ::AABB getLiquidAABB(::AABB const& aabb, ::MaterialType liquidType);
1227
1228 MCAPI static ::Vec3 getViewVector(::Vec2 const& prevRot, ::Vec2 const& rot, float a);
1229
1230 MCAPI static bool isImmobile(::EntityContext const& entity);
1231
1232 MCAPI static ::Actor*
1233 tryGetFromEntity(::StrictEntityContext const& entity, ::EntityRegistry& registry, bool includeRemoved);
1234 // NOLINTEND
1235
1236public:
1237 // constructor thunks
1238 // NOLINTBEGIN
1239 MCAPI void* $ctor(::ILevel& level, ::EntityContext& entityContext);
1240
1241 MCAPI void* $ctor(
1242 ::ActorDefinitionGroup* definitions,
1243 ::ActorDefinitionIdentifier const& definitionName,
1244 ::EntityContext& entityContext
1245 );
1246 // NOLINTEND
1247
1248public:
1249 // destructor thunk
1250 // NOLINTBEGIN
1251 MCAPI void $dtor();
1252 // NOLINTEND
1253
1254public:
1255 // virtual function thunks
1256 // NOLINTBEGIN
1257 MCAPI bool $hasComponent(::HashedString const& name) const;
1258
1259 MCAPI void $outOfWorld();
1260
1261 MCFOLD void $reloadHardcoded(::ActorInitializationMethod, ::VariantParameterList const&);
1262
1263 MCFOLD void $reloadHardcodedClient(::ActorInitializationMethod);
1264
1265 MCAPI void $initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const&);
1266
1267 MCAPI void $reloadComponents(::ActorInitializationMethod, ::VariantParameterList const&);
1268
1269 MCAPI void $_serverInitItemStackIds();
1270
1271 MCAPI void $_doInitialMove();
1272
1273 MCFOLD void $resetUserPos(bool);
1274
1275 MCAPI ::ActorType $getOwnerEntityType();
1276
1277 MCAPI void $remove();
1278
1279 MCAPI ::Vec3 $getFiringPos() const;
1280
1281 MCAPI float $getInterpolatedBodyRot(float a) const;
1282
1283 MCFOLD float $getInterpolatedHeadRot(float) const;
1284
1285 MCFOLD float $getInterpolatedBodyYaw(float) const;
1286
1287 MCAPI float $getYawSpeedInDegreesPerSecond() const;
1288
1289 MCFOLD ::Vec3 $getInterpolatedRidingOffset(float, int const) const;
1290
1291 MCAPI bool $isFireImmune() const;
1292
1293 MCAPI void $blockedByShield(::ActorDamageSource const& source, ::Actor& blocker);
1294
1295 MCAPI bool $canDisableShield();
1296
1297 MCAPI void $teleportTo(::Vec3 const& pos, bool shouldStopRiding, int, int, bool keepVelocity);
1298
1299 MCAPI void $lerpMotion(::Vec3 const& delta);
1300
1301 MCAPI ::std::unique_ptr<::AddActorBasePacket> $tryCreateAddActorPacket();
1302
1303 MCAPI void $normalTick();
1304
1305 MCAPI void $baseTick();
1306
1307 MCAPI void $passengerTick();
1308
1309 MCAPI bool $startRiding(::Actor& vehicle, bool forceRiding);
1310
1311 MCAPI void $addPassenger(::Actor& passenger);
1312
1313 MCAPI ::std::string $getExitTip(::std::string const& kind, ::InputMode mode, ::NewInteractionModel scheme) const;
1314
1315 MCAPI ::std::string $getEntityLocNameString() const;
1316
1317 MCAPI bool $isInvisible() const;
1318
1319 MCAPI bool $canShowNameTag() const;
1320
1321 MCAPI ::std::string $getFormattedNameTag() const;
1322
1323 MCFOLD ::mce::Color $getNameTagTextColor() const;
1324
1325 MCAPI float $getShadowRadius() const;
1326
1327 MCFOLD ::Vec3 $getHeadLookVector(float a) const;
1328
1329 MCFOLD bool $canInteractWithOtherEntitiesInGame() const;
1330
1331 MCAPI float $getBrightness(float a, ::IConstBlockSource const& region) const;
1332
1333 MCFOLD void $playerTouch(::Player&);
1334
1335 MCFOLD bool $isImmobile() const;
1336
1337 MCAPI bool $isSilentObserver() const;
1338
1339 MCFOLD bool $isSleeping() const;
1340
1341 MCFOLD void $setSleeping(bool);
1342
1343 MCAPI void $setSneaking(bool value);
1344
1345 MCFOLD bool $isBlocking() const;
1346
1347 MCFOLD bool $isDamageBlocked(::ActorDamageSource const&) const;
1348
1349 MCFOLD bool $isAlive() const;
1350
1351 MCFOLD bool $isOnFire() const;
1352
1353 MCFOLD bool $isSurfaceMob() const;
1354
1355 MCFOLD bool $isTargetable() const;
1356
1357 MCAPI void $setTarget(::Actor* entity);
1358
1359 MCFOLD bool $isValidTarget(::Actor*) const;
1360
1361 MCAPI void $performRangedAttack(::Actor& target, float);
1362
1363 MCAPI void $setOwner(::ActorUniqueID const ownerId);
1364
1365 MCFOLD void $setSitting(bool value);
1366
1367 MCFOLD void $onTame();
1368
1369 MCFOLD void $onFailedTame();
1370
1371 MCAPI void $setStanding(bool value);
1372
1373 MCAPI bool $canPowerJump() const;
1374
1375 MCAPI bool $isEnchanted() const;
1376
1377 MCAPI void $playAmbientSound();
1378
1379 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getAmbientSound() const;
1380
1381 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
1382
1383 MCAPI bool $doFireHurt(int amount);
1384
1385 MCAPI void $onLightningHit();
1386
1387 MCAPI void $feed(int itemId);
1388
1389 MCAPI void $handleEntityEvent(::ActorEvent eventId, int data);
1390
1391 MCFOLD ::HashedString const& $getActorRendererId() const;
1392
1393 MCAPI void $despawn();
1394
1395 MCFOLD void $setEquippedSlot(::SharedTypes::Legacy::EquipmentSlot, ::ItemStack const&);
1396
1397 MCAPI void $setCarriedItem(::ItemStack const& item);
1398
1399 MCAPI ::ItemStack const& $getCarriedItem() const;
1400
1401 MCAPI void $setOffhandSlot(::ItemStack const& item);
1402
1403 MCAPI ::ItemStack const& $getEquippedTotem() const;
1404
1405 MCAPI bool $consumeTotem();
1406
1407 MCAPI bool $load(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
1408
1409 MCFOLD ::HashedString const& $queryEntityRenderer() const;
1410
1411 MCFOLD ::ActorUniqueID $getSourceUniqueID() const;
1412
1413 MCFOLD bool $canFreeze() const;
1414
1415 MCAPI void $handleInsidePortal(::BlockPos const& portalPos);
1416
1417 MCAPI bool $canChangeDimensionsUsingPortal() const;
1418
1419 MCAPI void $changeDimension(::DimensionType toId);
1420
1421 MCFOLD void $changeDimension(::ChangeDimensionPacket const&);
1422
1423 MCFOLD ::ActorUniqueID $getControllingPlayer() const;
1424
1425 MCFOLD float $causeFallDamageToActor(float, float, ::ActorDamageSource);
1426
1427 MCAPI void $onSynchedDataUpdate(int dataId);
1428
1429 MCAPI bool $canAddPassenger(::Actor& passenger) const;
1430
1431 MCFOLD bool $canPickupItem(::ItemStack const&) const;
1432
1433 MCFOLD bool $canBePulledIntoVehicle() const;
1434
1435 MCFOLD bool $inCaravan() const;
1436
1437 MCAPI void $sendMotionPacketIfNeeded(::PlayerMovementSettings const& playerMovementSettings);
1438
1439 MCFOLD bool $canSynchronizeNewEntity() const;
1440
1441 MCAPI void $startSwimming();
1442
1443 MCAPI void $stopSwimming();
1444
1445 MCFOLD void $buildDebugInfo(::std::string&) const;
1446
1447 MCFOLD int $getDeathTime() const;
1448
1449 MCAPI bool $canBeAffected(uint id) const;
1450
1451 MCAPI bool $canBeAffectedByArrow(::MobEffectInstance const& effect) const;
1452
1453 MCAPI void $onEffectRemoved(::MobEffectInstance& effect);
1454
1455 MCAPI bool $canObstructSpawningAndBlockPlacement() const;
1456
1457 MCAPI ::AnimationComponent& $getAnimationComponent();
1458
1459 MCAPI void $openContainerComponent(::Player& player);
1460
1461 MCFOLD void $swing();
1462
1463 MCAPI void $useItem(::ItemStackBase& item, ::ItemUseMethod itemUseMethod, bool consumeItem);
1464
1465 MCAPI void $getDebugText(::std::vector<::std::string>& outputInfo);
1466
1467 MCAPI float $getMapDecorationRotation() const;
1468
1469 MCAPI float $getPassengerYRotation(::Actor const& passenger) const;
1470
1471 MCAPI bool $add(::ItemStack& item);
1472
1473 MCAPI bool $drop(::ItemStack const& item, bool const randomly);
1474
1475 MCAPI bool $getInteraction(::Player& player, ::ActorInteraction& interaction, ::Vec3 const&);
1476
1477 MCFOLD bool $canDestroyBlock(::Block const&) const;
1478
1479 MCFOLD void $setAuxValue(int);
1480
1481 MCFOLD void $renderDebugServerState(::Options const&);
1482
1483 MCAPI void $kill();
1484
1485 MCAPI void $die(::ActorDamageSource const& source);
1486
1487 MCAPI bool $shouldDropDeathLoot() const;
1488
1489 MCAPI void $applySnapshot(
1490 ::EntityContext const& snapshotEntity,
1491 ::MovementDataExtractionUtility::SnapshotAccessor const& originalSnapshotEntity
1492 );
1493
1494 MCFOLD void $onPush(::Actor&);
1495
1496 MCFOLD ::std::optional<::BlockPos> $getLastDeathPos() const;
1497
1498 MCFOLD ::std::optional<::DimensionType> $getLastDeathDimension() const;
1499
1500 MCFOLD bool $hasDiedBefore() const;
1501
1502 MCFOLD void $doEnterWaterSplashEffect();
1503
1504 MCFOLD void $doExitWaterSplashEffect();
1505
1506 MCAPI void $doWaterSplashEffect();
1507
1508 MCAPI bool $_shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot, ::ItemStack const& item) const;
1509
1510 MCAPI bool $_hurt(::ActorDamageSource const& source, float damage, bool, bool);
1511
1512 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
1513
1514 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
1515 // NOLINTEND
1516
1517public:
1518 // vftables
1519 // NOLINTBEGIN
1520 MCAPI static void** $vftable();
1521 // NOLINTEND
1522};
Definition AABB.h:16
Definition ActionEvent.h:8
Definition ActionQueue.h:5
Definition ActorDamageSource.h:18
Definition ActorDefinitionDescriptor.h:12
Definition ActorDefinitionDiffList.h:12
Definition ActorDefinitionGroup.h:27
Definition ActorDefinitionPtr.h:11
Definition ActorInteraction.h:5
Definition ActorRuntimeID.h:5
Definition ActorTerrainInterlockData.h:5
Definition Actor.h:104
Definition AddActorBasePacket.h:15
Definition AnimationComponent.h:26
Definition AttributeInstance.h:16
Definition Attribute.h:13
Definition AutomaticID.h:6
Definition BaseAttributeMap.h:16
Definition RedactableString.h:10
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:36
Definition ChangeDimensionPacket.h:20
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition Dimension.h:83
Definition DynamicProperties.h:12
Definition EntityContext.h:16
Definition EntityRegistry.h:15
Definition GameEvent.h:8
Definition GetCollisionShapeInterface.h:13
Definition HashedString.h:5
Definition HitResult.h:19
Definition IConstBlockSource.h:24
Definition ILevel.h:203
Definition ItemActor.h:27
Definition ItemDescriptor.h:22
Definition ItemStackBase.h:35
Definition ItemStack.h:25
Definition Level.h:234
Definition ListTag.h:12
Definition LootTable.h:14
Definition MerchantRecipeList.h:13
Definition MobEffectInstance.h:15
Definition MobEffect.h:27
Definition Mob.h:47
Definition MolangVariableMap.h:15
Definition SnapshotAccessor.h:12
Definition Options.h:32
Definition Player.h:119
Definition Random.h:16
Definition RenderParams.h:30
Definition RideableComponent.h:14
Definition RopeSystem.h:20
Definition SpatialActorNetworkData.h:14
Definition StrictEntityContext.h:10
Definition SynchedActorDataEntityWrapper.h:18
Definition UpdateEquipPacket.h:20
Definition Vec2.h:5
Definition Vec3.h:10
Definition WeakRef.h:8
Definition optional_ref.h:10
Definition ActorDefinitionIdentifier.h:13
Definition ActorUniqueID.h:5
Definition BuiltInActorComponents.h:13
Definition DistanceSortedActor.h:10
Definition EquipmentTable.h:12
Definition MutableAttributeWithContext.h:11
Definition PlayerMovementSettings.h:15
Definition VariantParameterList.h:5