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