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