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