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