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