LeviLamina
Loading...
Searching...
No Matches
Player.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/certificates/Certificate.h"
5#include "mc/entity/components/UserEntityIdentifierComponent.h"
6#include "mc/network/NetworkPeer.h"
7#include "mc/world/inventory/EnderChestContainer.h"
8
9// auto generated inclusion list
10#include "mc/certificates/identity/PlayerAuthenticationType.h"
11#include "mc/common/SubClientId.h"
12#include "mc/deps/core/math/Vec3.h"
13#include "mc/deps/core/platform/BuildPlatform.h"
14#include "mc/deps/core/string/HashedString.h"
15#include "mc/deps/core/timing/Stopwatch.h"
16#include "mc/deps/core/utility/AutomaticID.h"
17#include "mc/deps/core/utility/NonOwnerPointer.h"
18#include "mc/deps/core/utility/optional_ref.h"
19#include "mc/deps/core/utility/pub_sub/Publisher.h"
20#include "mc/deps/game_refs/OwnerPtr.h"
21#include "mc/deps/game_refs/StackRefResult.h"
22#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
23#include "mc/deps/shared_types/legacy/actor/ActorDamageCause.h"
24#include "mc/deps/shared_types/legacy/actor/ArmorSlot.h"
25#include "mc/legacy/ActorUniqueID.h"
26#include "mc/server/commands/CommandPermissionLevel.h"
27#include "mc/world/ContainerID.h"
28#include "mc/world/PlayerUIContainer.h"
29#include "mc/world/actor/ActorEvent.h"
30#include "mc/world/actor/ActorInitializationMethod.h"
31#include "mc/world/actor/ActorResetRule.h"
32#include "mc/world/actor/ActorType.h"
33#include "mc/world/actor/Mob.h"
34#include "mc/world/actor/player/AbilitiesIndex.h"
35#include "mc/world/actor/player/BedSleepingResult.h"
36#include "mc/world/actor/player/PlayerItemInUse.h"
37#include "mc/world/actor/player/PlayerSpawnFallbackType.h"
38#include "mc/world/actor/player/PlayerUISlot.h"
39#include "mc/world/inventory/InventoryOptions.h"
40#include "mc/world/inventory/transaction/InventoryTransactionManager.h"
41#include "mc/world/item/HandSlot.h"
42#include "mc/world/item/ItemGroup.h"
43#include "mc/world/item/ItemInstance.h"
44#include "mc/world/item/ItemUseMethod.h"
45#include "mc/world/level/BlockPos.h"
46#include "mc/world/level/GameType.h"
47
48// auto generated forward declare list
49// clang-format off
50class AABB;
51class Actor;
53class Agent;
55class Attribute;
56class Block;
57class BlockActor;
58class BlockSource;
59class BodyControl;
61class ChunkPos;
62class ChunkSource;
63class ChunkViewSource;
65class CompoundTag;
66class Container;
68class DataLoadHelper;
69class Dimension;
71class EntityContext;
73class GameMode;
80class Item;
81class ItemDescriptor;
82class ItemStack;
83class ItemStackBase;
87class Level;
90class Packet;
91class PacketSender;
93class PlayerInventory;
94class PlayerListener;
97class SerializedSkin;
98class ShieldItem;
99class SubChunkPos;
100class TextObjectRoot;
101class Vec2;
102struct AABBShapeComponent;
104struct INpcDialogueData;
110struct Tick;
112namespace Bedrock::PubSub::ThreadModel { struct SingleThreaded; }
113namespace Editor { class IEditorPlayer; }
114namespace mce { class Color; }
115namespace mce { class UUID; }
116// clang-format on
117
119
120class Player : public ::Mob {
121public:
122 // Player inner types declare
123 // clang-format off
124 struct CachedSpawnData;
127 struct PlayerSpawnPoint;
128 // clang-format on
129
130 // Player inner types define
131 using PlayerFlagIDType = char;
132
134 public:
135 // member variables
136 // NOLINTBEGIN
137 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
138 ::ll::TypedStorage<1, 1, bool> mIsAboveLeaves;
139 // NOLINTEND
140 };
141
143 public:
144 // member variables
145 // NOLINTBEGIN
146 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
147 ::ll::TypedStorage<4, 4, ::PlayerSpawnFallbackType> mSpawnFallbackType;
148 // NOLINTEND
149 };
150
151 enum class SpawnPositionState : int {
152 InitializeSpawnPositionRandomizer = 0,
153 WaitForClientAck = 1,
154 DetermineDimension = 2,
155 ChangeDimension = 3,
156 WaitForDimension = 4,
157 ChooseSpawnArea = 5,
158 CheckLoadedChunk = 6,
159 ChooseSpawnPosition = 7,
160 SpawnComplete = 8,
161 };
162
163 enum class SpawnPositionSource : int {
164 Randomizer = 0,
165 Respawn = 1,
166 Teleport = 2,
167 Static = 3,
168 };
169
171 public:
172 // member variables
173 // NOLINTBEGIN
174 ::ll::TypedStorage<4, 4, ::DimensionType> mRespawnDimensionId;
175 ::ll::TypedStorage<4, 12, ::Vec3> mActualRespawnPosition;
176 ::ll::TypedStorage<4, 12, ::BlockPos> mRequestedRespawnPosition;
177 ::ll::TypedStorage<1, 1, bool> mHasRespawnPosition;
178 ::ll::TypedStorage<4, 12, ::BlockPos> mSharedSpawnPosition;
179 ::ll::TypedStorage<1, 1, bool> mRespawnReady;
180 ::ll::TypedStorage<4, 12, ::Vec3> mPlayerPos;
181 ::ll::TypedStorage<1, 1, bool> mIsForcedRespawn;
182 ::ll::TypedStorage<1, 1, bool> mIsAdventure;
183 ::ll::TypedStorage<1, 1, bool> mIsFlyingOrNotOverworld;
184 ::ll::TypedStorage<1, 1, bool> mPositionLoadedFromSave;
185 // NOLINTEND
186 };
187
188 using PlayerListenerList = ::std::vector<::PlayerListener*>;
189
191 public:
192 // member variables
193 // NOLINTBEGIN
194 ::ll::TypedStorage<4, 12, ::BlockPos> mSpawnBlockPos;
195 ::ll::TypedStorage<4, 12, ::BlockPos> mPlayerPosition;
196 ::ll::TypedStorage<4, 4, ::DimensionType> mDimension;
197 // NOLINTEND
198
199 public:
200 // member functions
201 // NOLINTBEGIN
202 MCNAPI bool
203 setSpawnPoint(::BlockPos const& playerPosition, ::DimensionType dimension, ::BlockPos const& spawnBlock);
204 // NOLINTEND
205 };
206
207public:
208 LLNDAPI UserEntityIdentifierComponent const& getUserEntityIdentifier() const;
209
210 LLNDAPI UserEntityIdentifierComponent& getUserEntityIdentifier();
211
212 LLNDAPI optional_ref<ConnectionRequest const> getConnectionRequest() const;
213
214 LLNDAPI NetworkIdentifier const& getNetworkIdentifier() const;
215
216 LLNDAPI optional_ref<Certificate const> getCertificate() const;
217
218 LLNDAPI SubClientId const& getClientSubId() const;
219
220 LLNDAPI int getSelectedItemSlot() const;
221
226 LLNDAPI mce::UUID const& getUuid() const;
227
232 LLNDAPI std::string getIPAndPort() const;
233
238 LLNDAPI std::string getRealName() const;
239
246 LLNDAPI std::string getLocaleCode() const;
247
248 LLNDAPI std::optional<NetworkPeer::NetworkStatus> getNetworkStatus() const;
249
253 LLAPI void disconnect(std::string_view reason) const;
257 LLAPI void sendMessage(std::string_view msg) const;
258
259 LLAPI void setAbility(::AbilitiesIndex index, bool value);
260
268 LLNDAPI bool isOperator() const;
269
280 LLAPI bool addAndRefresh(class ItemStack& item);
281
282 LLNDAPI optional_ref<EnderChestContainer> getEnderChestContainer() const;
283
284public:
285 // member variables
286 // NOLINTBEGIN
287 ::ll::TypedStorage<8, 24, ::std::vector<ushort>> mOceanBiomes;
288 ::ll::TypedStorage<8, 24, ::std::vector<ushort>> mFroglights;
289 ::ll::TypedStorage<4, 4, float const> mSneakHeight;
290 ::ll::TypedStorage<4, 4, float const> mSneakOffset;
291 ::ll::TypedStorage<4, 4, int> mScore;
292 ::ll::TypedStorage<4, 4, ::BuildPlatform> mBuildPlatform;
293 ::ll::TypedStorage<8, 32, ::std::string> mUniqueName;
294 ::ll::TypedStorage<8, 32, ::std::string> mServerId;
295 ::ll::TypedStorage<8, 32, ::std::string> mSelfSignedId;
296 ::ll::TypedStorage<8, 32, ::std::string> mPlatformOfflineId;
297 ::ll::TypedStorage<8, 8, uint64> mClientRandomId;
298 ::ll::TypedStorage<8, 32, ::std::string> mPlatformId;
299 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mPendingVehicleID;
300 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mPendingLeftShoulderPassengerID;
301 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mPendingRightShoulderPassengerID;
302 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mInteractTarget;
303 ::ll::TypedStorage<4, 12, ::Vec3> mInteractTargetPos;
304 ::ll::TypedStorage<1, 1, bool> mHasFakeInventory;
305 ::ll::TypedStorage<1, 1, bool> mIsRegionSuspended;
306 ::ll::TypedStorage<1, 1, bool> mUpdateMobs;
307 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ChunkViewSource>> mChunkSource;
308 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ChunkViewSource>> mSpawnChunkSource;
309 ::ll::TypedStorage<4, 12, ::Vec3> mCapePosO;
310 ::ll::TypedStorage<4, 12, ::Vec3> mCapePos;
311 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContainerManagerModel>> mContainerManager;
312 ::ll::TypedStorage<
313 8,
314 8,
315 ::std::unique_ptr<
316 ::Bedrock::PubSub::
318 mContainerManagerSubscribers;
319 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerInventory>> mInventory;
320 ::ll::TypedStorage<4, 20, ::InventoryOptions> mInventoryOptions;
321 ::ll::TypedStorage<4, 4, float> mDistanceSinceTransformEvent;
322 ::ll::TypedStorage<8, 24, ::std::vector<::ItemInstance>> mCreativeItemList;
323 ::ll::TypedStorage<8, 32, ::std::string> mPlatformOnlineId;
324 ::ll::TypedStorage<4, 4, ::Player::SpawnPositionState> mSpawnPositionState;
325 ::ll::TypedStorage<4, 4, ::Player::SpawnPositionSource> mSpawnPositionSource;
326 ::ll::TypedStorage<4, 12, ::Vec3> mSpawnPositioningTestPosition;
327 ::ll::TypedStorage<4, 4, uint> mRespawnChunkBuilderPolicyHandle;
328 ::ll::TypedStorage<4, 64, ::Player::CachedSpawnData> mCachedSpawnData;
329 ::ll::TypedStorage<8, 16, ::OwnerPtr<::BlockSource>> mSpawnBlockSource;
330 ::ll::TypedStorage<8, 56, ::Stopwatch> mRespawnStopwatch_Searching;
331 ::ll::TypedStorage<4, 12, ::Vec3> mRespawnOriginalPosition;
332 ::ll::TypedStorage<4, 4, ::DimensionType> mRespawnOriginalDimension;
333 ::ll::TypedStorage<8, 32, ::std::string> mRespawnMessage;
334 ::ll::TypedStorage<1, 1, bool> mRespawnReady;
335 ::ll::TypedStorage<1, 1, bool> mIsInitialSpawnDone;
336 ::ll::TypedStorage<1, 1, bool> mRespawningFromTheEnd;
337 ::ll::TypedStorage<1, 1, bool> mPositionLoadedFromSave;
338 ::ll::TypedStorage<1, 1, bool> mBlockRespawnUntilClientMessage;
339 ::ll::TypedStorage<1, 1, bool> mHasSeenCredits;
340 ::ll::TypedStorage<4, 8, ::std::optional<::PlayerSpawnFallbackType>> mSpawnFallbackType;
341 ::ll::TypedStorage<4, 16, ::std::optional<::Vec3>> mSpawnFallbackPosition;
342 ::ll::TypedStorage<8, 168, ::PlayerItemInUse> mItemInUse;
343 ::ll::TypedStorage<4, 4, ::ActorType> mLastHurtBy;
344 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mPreviousInteractEntity;
345 ::ll::TypedStorage<4, 4, int> mPreviousCarriedItem;
346 ::ll::TypedStorage<4, 4, int> mEmoteTicks;
347 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::NetworkChunkPublisher>> mChunkPublisherView;
348 ::ll::TypedStorage<8, 8, ::PacketSender&> mPacketSender;
349 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::HudContainerManagerModel>> mHudContainerManagerModel;
350 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::EnderChestContainer>> mEnderChestInventory;
351 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> mTrackedBossIDs;
352 ::ll::TypedStorage<8, 136, ::ItemGroup> mCursorSelectedItemGroup;
353 ::ll::TypedStorage<8, 440, ::PlayerUIContainer> mPlayerUIContainer;
354 ::ll::TypedStorage<8, 48, ::InventoryTransactionManager> mTransactionManager;
355 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::GameMode>> mGameMode;
356 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerRespawnRandomizer>> mSpawnRandomizer;
357 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SerializedSkin>> mSkin;
358 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemStackNetManagerBase>> mItemStackNetManager;
359 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mUIAnimationComponent;
360 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mMapAnimationComponent;
361 ::ll::TypedStorage<4, 28, ::Player::PlayerSpawnPoint> mPlayerRespawnPoint;
362 ::ll::TypedStorage<4, 4, float> mServerBuildRatio;
363 ::ll::TypedStorage<1, 1, ::SubClientId> mClientId;
364 ::ll::TypedStorage<1, 1, bool> mInteractDataDirty;
365 ::ll::TypedStorage<1, 1, bool> mShouldClientGenerateChunks;
366 ::ll::TypedStorage<1, 1, bool> mUseMapAnimationComponent;
367 ::ll::TypedStorage<1, 1, bool> mIsDeferredRenderingFirstPersonObjects;
368 ::ll::TypedStorage<1, 1, bool> mDestroyingBlock;
369 ::ll::TypedStorage<1, 1, bool> mPlayerLevelChanged;
370 ::ll::TypedStorage<4, 4, int> mPreviousLevelRequirement;
371 ::ll::TypedStorage<4, 4, int> mLastLevelUpTime;
372 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mFirstPersonAnimationComponent;
373 ::ll::TypedStorage<8, 24, ::std::vector<::PlayerListener*>> mListeners;
374 ::ll::TypedStorage<4, 12, ::Vec3> mRespawnPositionCandidate;
375 ::ll::TypedStorage<4, 12, ::Vec3> mPreDimensionTransferSpawnPosition;
376 ::ll::TypedStorage<4, 4, int> mEnchantmentSeed;
377 ::ll::TypedStorage<8, 24, ::std::vector<uint>> mOnScreenAnimationTextures;
378 ::ll::TypedStorage<4, 4, int> mOnScreenAnimationTicks;
379 ::ll::TypedStorage<4, 4, uint> mChunkRadius;
380 ::ll::TypedStorage<4, 4, int> mMapIndex;
381 ::ll::TypedStorage<4, 4, float> mElytraVolume;
382 ::ll::TypedStorage<8, 8, uint64> mElytraLoop;
383 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, int>> mCooldowns;
384 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::HashedString>> mVanillaCooldowns;
385 ::ll::TypedStorage<8, 8, int64> mStartedBlockingTimeStamp;
386 ::ll::TypedStorage<8, 8, int64> mBlockedUsingShieldTimeStamp;
387 ::ll::TypedStorage<8, 8, int64> mBlockedUsingDamagedShieldTimeStamp;
388 ::ll::TypedStorage<8, 32, ::std::string> mName;
389 ::ll::TypedStorage<8, 32, ::std::string> mLastEmotePlayed;
390 ::ll::TypedStorage<8, 8, int64> mEmoteEasterEggEndTime;
391 ::ll::TypedStorage<4, 4, uint> mEmoteMessageCount;
392 ::ll::TypedStorage<8, 32, ::std::string> mDeviceId;
393 ::ll::TypedStorage<1, 1, bool> mFlagClientForBAIReset;
394 ::ll::TypedStorage<1, 1, bool> mSendInventoryOptionsToClient;
395 ::ll::TypedStorage<1, 1, bool> mIsHostingPlayer;
396 ::ll::TypedStorage<1, 1, bool> mPrevBlockedUsingShield;
397 ::ll::TypedStorage<1, 1, bool> mPrevBlockedUsingDamagedShield;
398 ::ll::TypedStorage<1, 1, bool> mUsedPotion;
399 ::ll::TypedStorage<8, 8, ::PlayerDestroyProgressCacheComponent&> mDestroyProgressCache;
400 // NOLINTEND
401
402public:
403 // prevent constructor by default
404 Player& operator=(Player const&);
405 Player(Player const&);
406 Player();
407
408public:
409 // virtual functions
410 // NOLINTBEGIN
411 // vIndex: 0
412 virtual ~Player() /*override*/;
413
414 // vIndex: 4
415 virtual void
416 initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
417
418 // vIndex: 2
419 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
420
421 // vIndex: 177
422 virtual void prepareRegion(::ChunkSource& mainChunkSource);
423
424 // vIndex: 178
425 virtual void destroyRegion();
426
427 // vIndex: 179
428 virtual void suspendRegion();
429
430 // vIndex: 180
431 virtual void _fireDimensionChanged();
432
433 // vIndex: 88
434 virtual bool canChangeDimensionsUsingPortal() const /*override*/;
435
436 // vIndex: 181
437 virtual void changeDimensionWithCredits(::DimensionType);
438
439 // vIndex: 182
440 virtual void tickWorld(::Tick const&);
441
442 // vIndex: 183
443 virtual void frameUpdate(::FrameUpdateContextBase&) = 0;
444
445 // vIndex: 184
446 virtual ::std::vector<::ChunkPos> const& getTickingOffsets() const;
447
448 // vIndex: 24
449 virtual void normalTick() /*override*/;
450
451 // vIndex: 185
452 virtual void moveView();
453
454 // vIndex: 186
455 virtual void moveSpawnView(::Vec3 const& spawnPosition, ::DimensionType dimensionType);
456
457 // vIndex: 93
458 virtual void onSynchedDataUpdate(int dataId) /*override*/;
459
460 // vIndex: 145
461 virtual void aiStep() /*override*/;
462
463 // vIndex: 18
464 virtual bool isFireImmune() const /*override*/;
465
466 // vIndex: 187
467 virtual void checkMovementStats(::Vec3 const&);
468
469 // vIndex: 188
470 virtual ::HashedString getCurrentStructureFeature() const;
471
472 // vIndex: 189
473 virtual bool isAutoJumpEnabled() const;
474
475 // vIndex: 17
476 virtual ::Vec3 getInterpolatedRidingOffset(float, int const) const /*override*/;
477
478 // vIndex: 26
479 virtual void passengerTick() /*override*/;
480
481 // vIndex: 123
482 virtual void die(::ActorDamageSource const& source) /*override*/;
483
484 // vIndex: 11
485 virtual void remove() /*override*/;
486
487 // vIndex: 190
488 virtual void respawn();
489
490 // vIndex: 124
491 virtual bool shouldDropDeathLoot() const /*override*/;
492
493 // vIndex: 163
494 virtual void dropEquipmentOnDeath(::ActorDamageSource const& source) /*override*/;
495
496 // vIndex: 162
497 virtual void dropEquipmentOnDeath() /*override*/;
498
499 // vIndex: 164
500 virtual void clearVanishEnchantedItemsOnDeath() /*override*/;
501
502 // vIndex: 117
503 virtual bool drop(::ItemStack const& item, bool const randomly) /*override*/;
504
505 // vIndex: 191
506 virtual void resetRot();
507
508 // vIndex: 9
509 virtual void resetUserPos(::ActorResetRule resetRule) /*override*/;
510
511 // vIndex: 192
512 virtual bool isInTrialMode();
513
514 // vIndex: 143
515 virtual void setSpeed(float _speed) /*override*/;
516
517 // vIndex: 149
518 virtual int getItemUseDuration() const /*override*/;
519
520 // vIndex: 150
521 virtual float getItemUseStartupProgress() const /*override*/;
522
523 // vIndex: 151
524 virtual float getItemUseIntervalProgress() const /*override*/;
525
526 // vIndex: 45
527 virtual bool isBlocking() const /*override*/;
528
529 // vIndex: 46
530 virtual bool isDamageBlocked(::ActorDamageSource const& source) const /*override*/;
531
532 // vIndex: 69
533 virtual void handleEntityEvent(::ActorEvent id, int data) /*override*/;
534
535 // vIndex: 160
536 virtual ::std::vector<::ItemStack const*> getAllHand() const /*override*/;
537
538 // vIndex: 161
539 virtual ::std::vector<::ItemStack const*> getAllEquipment() const /*override*/;
540
541 // vIndex: 116
542 virtual bool add(::ItemStack& item) /*override*/;
543
544 // vIndex: 103
545 virtual ::CommandPermissionLevel getCommandPermissionLevel() const /*override*/;
546
547 // vIndex: 53
548 virtual bool attack(::Actor&, ::SharedTypes::Legacy::ActorDamageCause const&) /*override*/;
549
550 // vIndex: 78
551 virtual ::ItemStack const& getCarriedItem() const /*override*/;
552
553 // vIndex: 77
554 virtual void setCarriedItem(::ItemStack const& item) /*override*/;
555
556 // vIndex: 193
557 virtual void openPortfolio();
558
559 // vIndex: 194
560 virtual void openBook(int, bool, int, ::BlockActor*);
561
562 // vIndex: 195
563 virtual void openTrading(::ActorUniqueID const&, bool);
564
565 // vIndex: 196
566 virtual void openChalkboard(::ChalkboardBlockActor&, bool);
567
568 // vIndex: 197
569 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc);
570
571 // vIndex: 198
572 virtual void openInventory();
573
574 // vIndex: 199
575 virtual void displayChatMessage(
576 ::std::string const& author,
577 ::std::string const& message,
578 ::std::optional<::std::string> const filteredMessage
579 );
580
581 // vIndex: 200
582 virtual void
583 displayClientMessage(::std::string const& message, ::std::optional<::std::string> const filteredMessage);
584
585 // vIndex: 201
586 virtual void displayTextObjectMessage(
587 ::TextObjectRoot const& textObject,
588 ::std::string const& fromXuid,
589 ::std::string const& fromPlatformId
590 );
591
592 // vIndex: 203
593 virtual void displayTextObjectWhisperMessage(
594 ::ResolvedTextObject const& resolvedTextObject,
595 ::std::string const& xuid,
596 ::std::string const& platformId
597 );
598
599 // vIndex: 202
600 virtual void displayTextObjectWhisperMessage(
601 ::std::string const& message,
602 ::std::string const& xuid,
603 ::std::string const& platformId
604 );
605
606 // vIndex: 204
607 virtual void displayWhisperMessage(
608 ::std::string const& author,
609 ::std::string const& message,
610 ::std::optional<::std::string> const filteredMessage,
611 ::std::string const& xuid,
612 ::std::string const& platformId
613 );
614
615 // vIndex: 35
616 virtual float getShadowRadius() const /*override*/;
617
618 // vIndex: 42
619 virtual bool isSleeping() const /*override*/;
620
621 // vIndex: 43
622 virtual void setSleeping(bool val) /*override*/;
623
624 // vIndex: 205
625 virtual ::BedSleepingResult startSleepInBed(::BlockPos const& bedBlockPos);
626
627 // vIndex: 206
628 virtual void stopSleepInBed(bool forcefulWakeUp, bool updateLevelList);
629
630 // vIndex: 207
631 virtual bool canStartSleepInBed();
632
633 // vIndex: 165
634 virtual void sendInventory(bool) /*override*/;
635
636 // vIndex: 208
637 virtual void openSign(::BlockPos const&, bool);
638
639 // vIndex: 209
640 virtual void playEmote(::std::string const&, bool const);
641
642 // vIndex: 41
643 virtual bool isSilentObserver() const /*override*/;
644
645 // vIndex: 112
646 virtual void useItem(::ItemStackBase& item, ::ItemUseMethod itemUseMethod, bool consumeItem) /*override*/;
647
648 // vIndex: 210
649 virtual bool isLoading() const;
650
651 // vIndex: 211
652 virtual bool isPlayerInitialized() const;
653
654 // vIndex: 212
655 virtual void stopLoading();
656
657 // vIndex: 142
658 virtual float getSpeed() const /*override*/;
659
660 // vIndex: 213
661 virtual void setPlayerGameType(::GameType);
662
663 // vIndex: 214
664 virtual void initHUDContainerManager();
665
666 // vIndex: 215
667 virtual void _crit(::Actor& actor);
668
669 // vIndex: 40
670 virtual bool isImmobile() const /*override*/;
671
672 // vIndex: 98
673 virtual void sendMotionPacketIfNeeded() /*override*/;
674
675 // vIndex: 216
676 virtual ::IMinecraftEventing* getEventing() const;
677
678 // vIndex: 217
679 virtual uint getUserId() const;
680
681 // vIndex: 218
682 virtual void addExperience(int xp);
683
684 // vIndex: 219
685 virtual void addLevels(int levels);
686
687 // vIndex: 72
688 virtual void setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item) /*override*/;
689
690 // vIndex: 79
691 virtual void setOffhandSlot(::ItemStack const& item) /*override*/;
692
693 // vIndex: 23
694 virtual ::std::unique_ptr<::Packet> tryCreateAddActorPacket() /*override*/;
695
696 // vIndex: 64
697 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const /*override*/;
698
699 // vIndex: 220
700 virtual void setContainerData(::IContainerManager&, int, int) = 0;
701
702 // vIndex: 221
703 virtual void slotChanged(::IContainerManager&, ::Container&, int, ::ItemStack const&, ::ItemStack const&, bool) = 0;
704
705 // vIndex: 222
706 virtual void refreshContainer(::IContainerManager&) = 0;
707
708 // vIndex: 223
709 virtual void deleteContainerManager();
710
711 // vIndex: 80
712 virtual ::ItemStack const& getEquippedTotem() const /*override*/;
713
714 // vIndex: 81
715 virtual bool consumeTotem() /*override*/;
716
717 // vIndex: 224
718 virtual bool isActorRelevant(::Actor const&);
719
720 // vIndex: 114
721 virtual float getMapDecorationRotation() const /*override*/;
722
723 // vIndex: 21
724 virtual void teleportTo(
725 ::Vec3 const& pos,
726 bool shouldStopRiding,
727 int cause,
728 int sourceEntityType,
729 bool keepVelocity
730 ) /*override*/;
731
732 // vIndex: 27
733 virtual bool startRiding(::Actor& vehicle, bool forceRiding) /*override*/;
734
735 // vIndex: 100
736 virtual void startSwimming() /*override*/;
737
738 // vIndex: 101
739 virtual void stopSwimming() /*override*/;
740
741 // vIndex: 225
742 virtual bool isTeacher() const = 0;
743
744 // vIndex: 226
745 virtual void onSuspension();
746
747 // vIndex: 227
748 virtual void onLinkedSlotsChanged();
749
750 // vIndex: 96
751 virtual bool canBePulledIntoVehicle() const /*override*/;
752
753 // vIndex: 68
754 virtual void feed(int itemId) /*override*/;
755
756 // vIndex: 228
757 virtual void sendInventoryTransaction(::InventoryTransaction const&) const = 0;
758
759 // vIndex: 229
760 virtual void sendComplexInventoryTransaction(::std::unique_ptr<::ComplexInventoryTransaction>) const = 0;
761
762 // vIndex: 230
763 virtual void sendNetworkPacket(::Packet& packet) const;
764
765 // vIndex: 172
766 virtual bool canExistWhenDisallowMob() const /*override*/;
767
768 // vIndex: 34
769 virtual ::mce::Color getNameTagTextColor() const /*override*/;
770
771 // vIndex: 94
772 virtual bool canAddPassenger(::Actor& passenger) const /*override*/;
773
774 // vIndex: 231
775 virtual ::PlayerEventCoordinator& getPlayerEventCoordinator() = 0;
776
777 // vIndex: 232
778 virtual bool isSimulated() const;
779
780 // vIndex: 233
781 virtual ::std::string getXuid() const;
782
783 // vIndex: 234
784 virtual ::PlayerMovementSettings const& getMovementSettings() const;
785
786 // vIndex: 85
787 virtual bool canFreeze() const /*override*/;
788
789 // vIndex: 37
790 virtual bool canInteractWithOtherEntitiesInGame() const /*override*/;
791
792 // vIndex: 108
793 virtual bool canObstructSpawningAndBlockPlacement() const /*override*/;
794
795 // vIndex: 127
796 virtual ::std::optional<::BlockPos> getLastDeathPos() const /*override*/;
797
798 // vIndex: 128
799 virtual ::std::optional<::DimensionType> getLastDeathDimension() const /*override*/;
800
801 // vIndex: 129
802 virtual bool hasDiedBefore() const /*override*/;
803
804 // vIndex: 130
805 virtual void doEnterWaterSplashEffect() /*override*/;
806
807 // vIndex: 131
808 virtual void doExitWaterSplashEffect() /*override*/;
809
810 // vIndex: 235
811 virtual void requestMissingSubChunk(::SubChunkPos const&);
812
813 // vIndex: 236
814 virtual uchar getMaxChunkBuildRadius() const;
815
816 // vIndex: 92
817 virtual float causeFallDamageToActor(float distance, float multiplier, ::ActorDamageSource source) /*override*/;
818
819 // vIndex: 135
820 virtual bool _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
821
822 // vIndex: 136
823 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
824
825 // vIndex: 137
826 virtual void addAdditionalSaveData(::CompoundTag& entityTag) const /*override*/;
827
828 // vIndex: 237
829 virtual void onMovePlayerPacketNormal(::Vec3 const& pos, ::Vec2 const& rot, float yHeadRot);
830
831 // vIndex: 133
832 virtual bool _shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot, ::ItemStack const& item) const
833 /*override*/;
834
835 // vIndex: 134
836 virtual bool _shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item) const
837 /*override*/;
838
839 // vIndex: 238
840 virtual ::std::shared_ptr<::ChunkViewSource> _createChunkSource(::ChunkSource& mainChunkSource);
841
842 // vIndex: 239
843 virtual void setAbilities(::LayeredAbilities const& newAbilities);
844
845 // vIndex: 109
846 virtual ::AnimationComponent& getAnimationComponent() /*override*/;
847
848 // vIndex: 70
849 virtual ::HashedString const& getActorRendererId() const /*override*/;
850
851 // vIndex: 240
852 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const = 0;
853
854 // vIndex: 241
855 virtual void destroyEditorPlayer() = 0;
856
857 // vIndex: 6
858 virtual void _serverInitItemStackIds() /*override*/;
859
860 // vIndex: 174
861 virtual ::std::unique_ptr<::BodyControl> initBodyControl() /*override*/;
862 // NOLINTEND
863
864public:
865 // member functions
866 // NOLINTBEGIN
867 MCAPI Player(
868 ::Level& level,
869 ::PacketSender& packetSender,
870 ::GameType playerGameType,
871 bool isHostingPlayer,
872 ::NetworkIdentifier const& owner,
873 ::SubClientId subid,
874 ::mce::UUID uuid,
875 ::std::string const& playFabId,
876 ::std::string const& deviceId,
877 ::PlayerAuthenticationType authType,
878 ::PlayerAuthenticationInfo const& authInfo,
879 ::EntityContext& entityContext,
880 ::std::string const& platformId,
881 ::std::string const& platformOnlineId
882 );
883
884 MCAPI void _addLevels(int levels);
885
886 MCAPI bool _attack(::Actor& actor, ::SharedTypes::Legacy::ActorDamageCause const& cause, bool doPredictiveSound);
887
888 MCAPI bool _blockUsingShield(::ActorDamageSource const& source, float damage);
889
890 MCAPI bool _checkAndFixSpawnPosition(
891 ::Vec3& spawnPosition,
892 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
893 bool adjustYToSolidGround,
894 bool searchUp,
895 bool positionFromSave
896 );
897
898 MCAPI void _chooseSpawnArea();
899
900 MCAPI bool _chooseSpawnPositionWithinArea();
901
902 MCAPI void _ensureSafeSpawnPosition(::Vec3& pos);
903
904 MCAPI bool _findFallbackSpawnPosition(
905 ::Vec3& spawnPosition,
906 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
907 uint maxDistance,
908 bool checkStoredFallback
909 );
910
911 MCAPI ::std::optional<::BlockPos> _findValidPosWithVerticalSpace(::BlockPos spawnPosition);
912
913 MCAPI void _handleCarriedItemInteractText();
914
915 MCAPI bool _isChunkSourceLoaded(::Vec3 const& spawnPosition, ::BlockSource const& region) const;
916
917 MCAPI void _loadInventoryOptions(::CompoundTag const& tag);
918
919 MCAPI void _preSpawnBuildSpawnDataCache();
920
921 MCAPI void _registerElytraLoopSound();
922
923 MCAPI void _registerPlayerAttributes();
924
925 MCAPI void _resetClientAnimations();
926
927 MCAPI void _saveInventoryOptions(::CompoundTag& tag) const;
928
929 MCAPI void _sendShieldUpdatePacket(
930 ::ShieldItem const& shieldItem,
931 ::ItemStack const& before,
932 ::ItemStack const& after,
933 ::ContainerID container,
934 int slot
935 );
936
937 MCAPI void _setPlayerGameType(::GameType gameType);
938
939 MCAPI bool _shouldCrit(::Actor const& target) const;
940
941 MCAPI void _updateInteraction();
942
943 MCAPI bool _validateSpawnPositionAvailability(
944 ::Vec3 const& pos,
945 ::BlockSource* blockSourceChunkCheck,
946 ::Vec3 const* const AABBoffset
947 ) const;
948
949 MCAPI bool canBeSeenOnMap() const;
950
951 MCAPI bool canJump();
952
953 MCAPI bool canOpenContainerScreen();
954
955 MCAPI bool canSleep() const;
956
957 MCAPI bool canStackInOffhand(::ItemStack const& item) const;
958
959 MCAPI bool canUseAbility(::AbilitiesIndex abilityIndex) const;
960
961 MCAPI bool canUseOperatorBlocks() const;
962
963 MCAPI void causeFoodExhaustion(float exhaustionAmount);
964
965 MCAPI bool checkBed(::BlockSource* spawnBlockSource, ::Vec3 const* const positionToCheck);
966
967 MCAPI bool checkNeedAutoJump(float inputMoveX, float inputMoveZ);
968
969 MCAPI bool checkSpawnBlock(::BlockSource const& region) const;
970
971 MCAPI void completeUsingItem();
972
973 MCAPI void eat(::ItemStack const& instance);
974
975 MCAPI void eat(int hungerValue, float saturationModifier);
976
977 MCAPI bool equippedArmorItemCanBeMoved(::ItemStack const& item) const;
978
979 MCAPI void fireDimensionChangedEvent(::DimensionType fromDimension, ::DimensionType toDimension);
980
981 MCAPI ::LayeredAbilities const& getAbilities() const;
982
983 MCFOLD ::LayeredAbilities& getAbilities();
984
985 MCAPI ::Agent* getAgent() const;
986
987 MCAPI ::ItemStack const& getCurrentActiveShield() const;
988
989 MCAPI float getDestroyProgress(::Block const& block);
990
991 MCAPI ::DimensionType getExpectedSpawnDimensionId() const;
992
993 MCAPI ::BlockPos const& getExpectedSpawnPosition() const;
994
995 MCAPI ::std::string getInteractText() const;
996
997 MCAPI int getItemCooldownLeft(::HashedString const& type) const;
998
999 MCAPI ::std::string getItemInteractText(::Item const& item) const;
1000
1001 MCAPI ::AABB getPickupArea() const;
1002
1003 MCAPI ::GameType getPlayerGameType() const;
1004
1005 MCFOLD ::ItemStack const& getSelectedItem() const;
1006
1007 MCAPI float getSleepRotation() const;
1008
1009 MCAPI int getXpNeededForNextLevel() const;
1010
1011 MCFOLD bool hasOwnedChunkSource() const;
1012
1013 MCAPI bool hasResource(::ItemDescriptor const& resource);
1014
1015 MCAPI bool hasRespawnPosition() const;
1016
1017 MCAPI bool interact(::Actor& actor, ::Vec3 const& location);
1018
1019 MCAPI void inventoryChanged(
1020 ::Container&,
1021 int slot,
1022 ::ItemStack const& oldItem,
1023 ::ItemStack const& newItem,
1024 bool forceBalanced
1025 );
1026
1027 MCAPI bool is2DPositionRelevant(::DimensionType dimension, ::BlockPos const& position);
1028
1029 MCAPI bool isFlying() const;
1030
1031 MCAPI bool isForcedRespawn() const;
1032
1033 MCAPI bool isHiddenFrom(::Mob& target) const;
1034
1035 MCAPI bool isInRaid() const;
1036
1037 MCAPI bool isItemOnCooldown(::HashedString const& type) const;
1038
1039 MCAPI void loadLastDeathLocation(::CompoundTag const& tag);
1040
1041 MCAPI void playFallOrLandSound(int expectedDamage, ::Block const& onBlock, ::Block const& blockAbove);
1042
1043 MCAPI void playPredictiveSynchronizedSound(
1044 ::SharedTypes::Legacy::LevelSoundEvent type,
1045 ::Vec3 const& pos,
1046 int data,
1047 bool isGlobal
1048 );
1049
1050 MCAPI void recheckSpawnPosition();
1051
1052 MCAPI void releaseUsingItem();
1053
1054 MCAPI void resetPlayerLevel();
1055
1056 MCAPI void saveLastDeathLocation(::CompoundTag& tag) const;
1057
1058 MCAPI void sendEventPacket(::LegacyTelemetryEventPacket& packet) const;
1059
1060 MCAPI void setBedRespawnPosition(::BlockPos const& bedPosition);
1061
1062 MCAPI void setContainerManagerModel(::std::shared_ptr<::ContainerManagerModel> manager);
1063
1064 MCAPI void setHasDied(bool hasDied);
1065
1066 MCAPI void setLastDeathDimension(::DimensionType dimension);
1067
1068 MCAPI void setLastDeathPos(::BlockPos pos);
1069
1070 MCAPI void setName(::std::string const& newName);
1071
1072 MCAPI void setPlatformOnlineId(::std::string const& platformOnlineId);
1073
1074 MCAPI void setPlayerUIItem(::PlayerUISlot slot, ::ItemStack const& item, bool forceBalance);
1075
1076 MCAPI void setRespawnPosition(::BlockPos const& inRespawnPosition, ::DimensionType dimension);
1077
1078 MCAPI void setRespawnPositionCandidate();
1079
1080 MCAPI void setSelectedItem(::ItemStack const& item);
1081
1082 MCAPI ::ItemStack const& setSelectedSlot(int slot);
1083
1084 MCAPI bool setSpawnBlockRespawnPosition(::BlockPos const& spawnBlockPosition, ::DimensionType dimension);
1085
1086 MCAPI void startCooldown(::Item const* item, bool updateClient);
1087
1088 MCAPI void startCooldown(::HashedString const& type, int tickDuration, bool updateClient);
1089
1090 MCAPI void startGliding();
1091
1092 MCAPI void
1093 startItemUseOn(uchar face, ::BlockPos const& blockPos, ::BlockPos const& buildBlockPos, ::ItemStack const& item);
1094
1095 MCAPI void startUsingItem(::ItemStack const& instance, int duration);
1096
1097 MCAPI void stopGliding();
1098
1099 MCAPI void stopItemUseOn(::BlockPos const& blockPos, ::ItemStack const& item);
1100
1101 MCAPI void stopUsingItem();
1102
1103 MCAPI bool take(::Actor& actor, int, int favoredSlot);
1104
1105 MCAPI void tickArmor();
1106
1107 MCAPI bool tryStartGliding();
1108
1109 MCAPI void unRegisterTrackedBoss(::ActorUniqueID mob);
1110
1111 MCAPI void updateInventoryTransactions();
1112
1113 MCAPI void updateSkin(::SerializedSkin const& skin, int clientSubID);
1114
1115 MCAPI void updateTrackedBosses();
1116
1117 MCAPI void useSelectedItem(::ItemUseMethod itemUseMethod, bool consumeItem);
1118 // NOLINTEND
1119
1120public:
1121 // static functions
1122 // NOLINTBEGIN
1123 MCAPI static void _causeFoodExhaustion(::MutableAttributeWithContext& attribute, float exhaustionAmount);
1124
1125 MCAPI static ::std::optional<::Player::FixedSpawnPositionData_DEPRECATED> checkAndFixSpawnPosition_DEPRECATED(
1126 ::Vec3 const& spawnPosition,
1127 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
1128 ::AABB aabb,
1129 bool adjustYToSolidGround,
1130 bool,
1131 bool searchUp,
1132 bool positionFromSave,
1133 bool spawningAtForcedSpawn,
1134 short dimensionHeight
1135 );
1136
1137 MCAPI static bool checkNeedAutoJump(
1138 ::IConstBlockSource const& region,
1139 ::AABBShapeComponent const& aabbShape,
1140 ::ActorRotationComponent const& actorRotation,
1141 float movementSpeed,
1142 ::StateVectorComponent const& stateVector,
1143 ::optional_ref<::GetCollisionShapeInterface const> collisionShapeInterface,
1144 float inputMoveX,
1145 float inputMoveZ
1146 );
1147
1148 MCAPI static ::std::optional<::SharedTypes::Legacy::LevelSoundEvent>
1149 getCustomHurtSound(::Mob& mob, ::SharedTypes::Legacy::ActorDamageCause cause);
1150
1151 MCAPI static bool isDangerousVolumeForSpawn(::BlockSource& region, ::AABB const& centeredAABB);
1152
1153 MCAPI static bool
1154 isDangerousVolume_DEPRECATED(::BlockSource& region, ::AABB const& centeredAABB, bool checkForLava);
1155
1156 MCAPI static ::Player* tryGetFromEntity(::EntityContext& entity, bool includeRemoved);
1157
1158 MCAPI static ::Player* tryGetFromEntity(::StackRefResult<::EntityContext> entity, bool includeRemoved);
1159
1160 MCAPI static void
1161 updatePlayerGameTypeEntityData(::EntityContext& entity, ::GameType gameType, ::GameType defaultGameType);
1162 // NOLINTEND
1163
1164public:
1165 // static variables
1166 // NOLINTBEGIN
1167 MCAPI static float const& DEFAULT_BB_HEIGHT();
1168
1169 MCAPI static float const& DEFAULT_BB_WIDTH();
1170
1171 MCAPI static float const& DEFAULT_PLAYER_EYE_OFFSET();
1172
1173 MCAPI static float const& DEFAULT_PLAYER_HEIGHT_OFFSET();
1174
1175 MCAPI static float const& DISTANCE_TO_TRANSFORM_EVENT();
1176
1177 MCAPI static ::Attribute const& EXHAUSTION();
1178
1179 MCAPI static ::Attribute const& EXPERIENCE();
1180
1181 MCAPI static int const& GLIDE_STOP_DELAY();
1182
1183 MCAPI static ::Attribute const& HUNGER();
1184
1185 MCAPI static ::Attribute const& LEVEL();
1186
1187 MCAPI static float const& PLAYER_SLEEPING_HEIGHT();
1188
1189 MCAPI static ::Attribute const& SATURATION();
1190 // NOLINTEND
1191
1192public:
1193 // constructor thunks
1194 // NOLINTBEGIN
1195 MCAPI void* $ctor(
1196 ::Level& level,
1197 ::PacketSender& packetSender,
1198 ::GameType playerGameType,
1199 bool isHostingPlayer,
1200 ::NetworkIdentifier const& owner,
1201 ::SubClientId subid,
1202 ::mce::UUID uuid,
1203 ::std::string const& playFabId,
1204 ::std::string const& deviceId,
1205 ::PlayerAuthenticationType authType,
1206 ::PlayerAuthenticationInfo const& authInfo,
1207 ::EntityContext& entityContext,
1208 ::std::string const& platformId,
1209 ::std::string const& platformOnlineId
1210 );
1211 // NOLINTEND
1212
1213public:
1214 // destructor thunk
1215 // NOLINTBEGIN
1216 MCAPI void $dtor();
1217 // NOLINTEND
1218
1219public:
1220 // virtual function thunks
1221 // NOLINTBEGIN
1222 MCAPI void $initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const& params);
1223
1224 MCAPI void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
1225
1226 MCAPI void $prepareRegion(::ChunkSource& mainChunkSource);
1227
1228 MCAPI void $destroyRegion();
1229
1230 MCAPI void $suspendRegion();
1231
1232 MCAPI void $_fireDimensionChanged();
1233
1234 MCAPI bool $canChangeDimensionsUsingPortal() const;
1235
1236 MCFOLD void $changeDimensionWithCredits(::DimensionType);
1237
1238 MCAPI void $tickWorld(::Tick const&);
1239
1240 MCAPI ::std::vector<::ChunkPos> const& $getTickingOffsets() const;
1241
1242 MCAPI void $normalTick();
1243
1244 MCAPI void $moveView();
1245
1246 MCAPI void $moveSpawnView(::Vec3 const& spawnPosition, ::DimensionType dimensionType);
1247
1248 MCFOLD void $onSynchedDataUpdate(int dataId);
1249
1250 MCAPI void $aiStep();
1251
1252 MCAPI bool $isFireImmune() const;
1253
1254 MCFOLD void $checkMovementStats(::Vec3 const&);
1255
1256 MCFOLD ::HashedString $getCurrentStructureFeature() const;
1257
1258 MCFOLD bool $isAutoJumpEnabled() const;
1259
1260 MCAPI ::Vec3 $getInterpolatedRidingOffset(float, int const) const;
1261
1262 MCAPI void $passengerTick();
1263
1264 MCAPI void $die(::ActorDamageSource const& source);
1265
1266 MCAPI void $remove();
1267
1268 MCAPI void $respawn();
1269
1270 MCAPI bool $shouldDropDeathLoot() const;
1271
1272 MCAPI void $dropEquipmentOnDeath(::ActorDamageSource const& source);
1273
1274 MCAPI void $dropEquipmentOnDeath();
1275
1276 MCFOLD void $clearVanishEnchantedItemsOnDeath();
1277
1278 MCAPI bool $drop(::ItemStack const& item, bool const randomly);
1279
1280 MCFOLD void $resetRot();
1281
1282 MCAPI void $resetUserPos(::ActorResetRule resetRule);
1283
1284 MCFOLD bool $isInTrialMode();
1285
1286 MCAPI void $setSpeed(float _speed);
1287
1288 MCAPI int $getItemUseDuration() const;
1289
1290 MCAPI float $getItemUseStartupProgress() const;
1291
1292 MCAPI float $getItemUseIntervalProgress() const;
1293
1294 MCAPI bool $isBlocking() const;
1295
1296 MCAPI bool $isDamageBlocked(::ActorDamageSource const& source) const;
1297
1298 MCAPI void $handleEntityEvent(::ActorEvent id, int data);
1299
1300 MCAPI ::std::vector<::ItemStack const*> $getAllHand() const;
1301
1302 MCAPI ::std::vector<::ItemStack const*> $getAllEquipment() const;
1303
1304 MCAPI bool $add(::ItemStack& item);
1305
1306 MCFOLD ::ItemStack const& $getCarriedItem() const;
1307
1308 MCAPI void $setCarriedItem(::ItemStack const& item);
1309
1310 MCFOLD void $openPortfolio();
1311
1312 MCFOLD void $openBook(int, bool, int, ::BlockActor*);
1313
1314 MCFOLD void $openTrading(::ActorUniqueID const&, bool);
1315
1316 MCFOLD void $openChalkboard(::ChalkboardBlockActor&, bool);
1317
1318 MCFOLD void $openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc);
1319
1320 MCFOLD void $openInventory();
1321
1322 MCFOLD void $displayChatMessage(
1323 ::std::string const& author,
1324 ::std::string const& message,
1325 ::std::optional<::std::string> const filteredMessage
1326 );
1327
1328 MCAPI void
1329 $displayClientMessage(::std::string const& message, ::std::optional<::std::string> const filteredMessage);
1330
1331 MCFOLD void $displayTextObjectMessage(
1332 ::TextObjectRoot const& textObject,
1333 ::std::string const& fromXuid,
1334 ::std::string const& fromPlatformId
1335 );
1336
1337 MCFOLD void $displayTextObjectWhisperMessage(
1338 ::ResolvedTextObject const& resolvedTextObject,
1339 ::std::string const& xuid,
1340 ::std::string const& platformId
1341 );
1342
1343 MCFOLD void $displayTextObjectWhisperMessage(
1344 ::std::string const& message,
1345 ::std::string const& xuid,
1346 ::std::string const& platformId
1347 );
1348
1349 MCFOLD void $displayWhisperMessage(
1350 ::std::string const& author,
1351 ::std::string const& message,
1352 ::std::optional<::std::string> const filteredMessage,
1353 ::std::string const& xuid,
1354 ::std::string const& platformId
1355 );
1356
1357 MCAPI float $getShadowRadius() const;
1358
1359 MCAPI bool $isSleeping() const;
1360
1361 MCAPI void $setSleeping(bool val);
1362
1363 MCAPI ::BedSleepingResult $startSleepInBed(::BlockPos const& bedBlockPos);
1364
1365 MCAPI void $stopSleepInBed(bool forcefulWakeUp, bool updateLevelList);
1366
1367 MCAPI bool $canStartSleepInBed();
1368
1369 MCFOLD void $sendInventory(bool);
1370
1371 MCFOLD void $openSign(::BlockPos const&, bool);
1372
1373 MCFOLD void $playEmote(::std::string const&, bool const);
1374
1375 MCAPI bool $isSilentObserver() const;
1376
1377 MCAPI void $useItem(::ItemStackBase& item, ::ItemUseMethod itemUseMethod, bool consumeItem);
1378
1379 MCFOLD bool $isLoading() const;
1380
1381 MCFOLD bool $isPlayerInitialized() const;
1382
1383 MCFOLD void $stopLoading();
1384
1385 MCAPI float $getSpeed() const;
1386
1387 MCAPI void $initHUDContainerManager();
1388
1389 MCAPI void $_crit(::Actor& actor);
1390
1391 MCAPI bool $isImmobile() const;
1392
1393 MCFOLD void $sendMotionPacketIfNeeded();
1394
1395 MCAPI ::IMinecraftEventing* $getEventing() const;
1396
1397 MCFOLD uint $getUserId() const;
1398
1399 MCAPI void $addExperience(int xp);
1400
1401 MCAPI void $addLevels(int levels);
1402
1403 MCAPI void $setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item);
1404
1405 MCAPI void $setOffhandSlot(::ItemStack const& item);
1406
1407 MCAPI ::std::unique_ptr<::Packet> $tryCreateAddActorPacket();
1408
1409 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
1410
1411 MCAPI void $deleteContainerManager();
1412
1413 MCAPI ::ItemStack const& $getEquippedTotem() const;
1414
1415 MCAPI bool $consumeTotem();
1416
1417 MCFOLD bool $isActorRelevant(::Actor const&);
1418
1419 MCAPI float $getMapDecorationRotation() const;
1420
1421 MCAPI void
1422 $teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int sourceEntityType, bool keepVelocity);
1423
1424 MCAPI bool $startRiding(::Actor& vehicle, bool forceRiding);
1425
1426 MCAPI void $startSwimming();
1427
1428 MCAPI void $stopSwimming();
1429
1430 MCFOLD void $onSuspension();
1431
1432 MCFOLD void $onLinkedSlotsChanged();
1433
1434 MCFOLD bool $canBePulledIntoVehicle() const;
1435
1436 MCAPI void $feed(int itemId);
1437
1438 MCFOLD void $sendNetworkPacket(::Packet& packet) const;
1439
1440 MCFOLD bool $canExistWhenDisallowMob() const;
1441
1442 MCAPI ::mce::Color $getNameTagTextColor() const;
1443
1444 MCAPI bool $canAddPassenger(::Actor& passenger) const;
1445
1446 MCFOLD bool $isSimulated() const;
1447
1448 MCAPI ::std::string $getXuid() const;
1449
1450 MCAPI ::PlayerMovementSettings const& $getMovementSettings() const;
1451
1452 MCAPI bool $canFreeze() const;
1453
1454 MCAPI bool $canInteractWithOtherEntitiesInGame() const;
1455
1456 MCAPI bool $canObstructSpawningAndBlockPlacement() const;
1457
1458 MCAPI ::std::optional<::BlockPos> $getLastDeathPos() const;
1459
1460 MCAPI ::std::optional<::DimensionType> $getLastDeathDimension() const;
1461
1462 MCAPI bool $hasDiedBefore() const;
1463
1464 MCAPI void $doEnterWaterSplashEffect();
1465
1466 MCAPI void $doExitWaterSplashEffect();
1467
1468 MCFOLD void $requestMissingSubChunk(::SubChunkPos const&);
1469
1470 MCFOLD uchar $getMaxChunkBuildRadius() const;
1471
1472 MCAPI float $causeFallDamageToActor(float distance, float multiplier, ::ActorDamageSource source);
1473
1474 MCAPI bool $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
1475
1476 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
1477
1478 MCAPI void $addAdditionalSaveData(::CompoundTag& entityTag) const;
1479
1480 MCAPI void $onMovePlayerPacketNormal(::Vec3 const& pos, ::Vec2 const& rot, float yHeadRot);
1481
1482 MCAPI bool $_shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot, ::ItemStack const& item) const;
1483
1484 MCAPI bool $_shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot, ::ItemStack const& item) const;
1485
1486 MCAPI ::std::shared_ptr<::ChunkViewSource> $_createChunkSource(::ChunkSource& mainChunkSource);
1487
1488 MCAPI void $setAbilities(::LayeredAbilities const& newAbilities);
1489
1490 MCAPI ::AnimationComponent& $getAnimationComponent();
1491
1492 MCAPI ::HashedString const& $getActorRendererId() const;
1493
1494 MCFOLD void $_serverInitItemStackIds();
1495
1496 MCAPI ::std::unique_ptr<::BodyControl> $initBodyControl();
1497 // NOLINTEND
1498
1499public:
1500 // vftables
1501 // NOLINTBEGIN
1502 MCNAPI static void** $vftable();
1503 // NOLINTEND
1504};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition Actor.h:103
Definition Agent.h:29
Definition AnimationComponent.h:26
Definition Attribute.h:9
Definition AutomaticID.h:6
Definition BlockActor.h:32
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:38
Definition BodyControl.h:13
Definition ChalkboardBlockActor.h:24
Definition ChunkPos.h:11
Definition ChunkSource.h:34
Definition ChunkViewSource.h:22
Definition ComplexInventoryTransaction.h:20
Definition CompoundTag.h:13
Definition ConnectionRequest.h:23
Definition ContainerManagerModel.h:29
Definition Container.h:30
Definition DataLoadHelper.h:20
Definition Dimension.h:83
Definition EnderChestContainer.h:15
Definition EntityContext.h:16
Definition FrameUpdateContextBase.h:5
Definition GameMode.h:22
Definition GetCollisionShapeInterface.h:13
Definition HashedString.h:5
Definition HudContainerManagerModel.h:18
Definition IConstBlockSource.h:24
Definition IContainerManager.h:16
Definition IMinecraftEventing.h:144
Definition InventoryTransaction.h:21
Definition ItemDescriptor.h:22
Definition ItemStackBase.h:35
Definition ItemStackNetManagerBase.h:28
Definition ItemStack.h:25
Definition Item.h:65
Definition LayeredAbilities.h:18
Definition LegacyTelemetryEventPacket.h:28
Definition Level.h:239
Definition Mob.h:47
Definition NetworkChunkPublisher.h:28
Definition NetworkIdentifier.h:10
Definition PacketSender.h:17
Definition Packet.h:26
Definition PlayerEventCoordinator.h:20
Definition PlayerInventory.h:18
Definition PlayerListener.h:10
Definition PlayerRespawnRandomizer.h:8
Definition Player.h:120
LLNDAPI std::string getIPAndPort() const
Get the player's IP and port.
static MCAPI void ** $vftable()
LLNDAPI std::string getLocaleCode() const
Get the name of the player's langtext.
LLAPI void sendMessage(std::string_view msg) const
Send a message to player.
LLAPI bool addAndRefresh(class ItemStack &item)
Give player item and refresh.
LLNDAPI mce::UUID const & getUuid() const
Get the player's uuid.
LLNDAPI bool isOperator() const
Determine if a player is an administrator of the server.
LLNDAPI std::string getRealName() const
Get the player's real in-game nickname.
LLAPI void disconnect(std::string_view reason) const
Disconnect player's client.
Definition ResolvedTextObject.h:5
Definition SerializedSkin.h:16
Definition ShieldItem.h:31
Definition StackRefResult.h:7
Definition SubChunkPos.h:5
Definition TextObjectRoot.h:14
Definition UserEntityIdentifierComponent.h:12
Definition Vec2.h:5
Definition Vec3.h:10
Definition UUID.h:7
Definition optional_ref.h:10
STL namespace.
Definition AABBShapeComponent.h:9
Definition ActorRotationComponent.h:8
Definition ActorUniqueID.h:5
Definition INpcDialogueData.h:12
Definition MutableAttributeWithContext.h:13
Definition PlayerAuthenticationInfo.h:5
Definition PlayerDestroyProgressCacheComponent.h:8
Definition PlayerMovementSettings.h:9
Definition Player.h:170
Definition Player.h:142
Definition Player.h:190
MCAPI bool setSpawnPoint(::BlockPos const &playerPosition, ::DimensionType dimension, ::BlockPos const &spawnBlock)
Definition StateVectorComponent.h:8
Definition Tick.h:5
Definition VariantParameterList.h:5