129class Player :
public ::Mob {
141 enum class SpawnPositionSource :
int {
148 enum class SpawnPositionState :
int {
149 InitializeSpawnPositionRandomizer = 0,
150 WaitForClientAck = 1,
151 DetermineDimension = 2,
153 WaitForDimension = 4,
155 CheckLoadedChunk = 6,
156 ChooseSpawnPosition = 7,
163 enum class Sound :
int {
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;
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;
201 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
202 ::ll::TypedStorage<4, 4, ::PlayerSpawnFallbackType> mSpawnFallbackType;
210 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
211 ::ll::TypedStorage<1, 1, bool> mIsAboveLeaves;
219 ::ll::TypedStorage<4, 12, ::BlockPos> mSpawnBlockPos;
220 ::ll::TypedStorage<4, 12, ::BlockPos> mPlayerPosition;
221 ::ll::TypedStorage<4, 4, ::DimensionType> mDimension;
225 using PlayerFlagIDType = schar;
227 using PlayerListenerList = ::std::vector<::PlayerListener*>;
238 LLNDAPI SubClientId
const& getClientSubId()
const;
240 LLNDAPI
int getSelectedItemSlot()
const;
268 LLNDAPI std::optional<NetworkPeer::NetworkStatus> getNetworkStatus()
const;
279 LLAPI
void setAbility(::AbilitiesIndex index,
bool value);
306 LLNDAPI
static Player* tryGetFromEntity(
::EntityContext& entity,
bool includeRemoved);
308 LLNDAPI
ItemStack const& getSelectedItem()
const;
310 LLAPI
void setSelectedItem(
ItemStack const& item)
const;
312 LLNDAPI
bool canSleep()
const;
314 LLNDAPI
bool isHungry()
const;
316 LLNDAPI
int getXpNeededForNextLevel();
318 LLNDAPI
int getPreviousLevelRequirement();
320 LLNDAPI
int getXpEarnedAtCurrentLevel();
322 LLNDAPI
bool setXpEarnedAtCurrentLevel(
int xp);
324 LLNDAPI
static long long getXpNeededForLevelRange(
int startLevel,
int endLevel);
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;
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, uchar> mSendPlayerOptionsFlags;
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;
450 Player& operator=(Player
const&);
451 Player(Player
const&);
466 virtual void destroyRegion();
468 virtual void suspendRegion();
470 virtual void _fireDimensionChanged();
472 virtual bool canChangeDimensionsUsingPortal() const ;
474 virtual
void changeDimensionWithCredits(::
DimensionType dimension);
477 virtual void tickWorld(
::Tick const&);
479 virtual void tickWorld(
::Tick const& currentTick);
484 virtual ::std::vector<::ChunkPos>
const& getTickingOffsets()
const;
486 virtual void normalTick() ;
488 virtual void moveView();
492 virtual void onSynchedDataUpdate(
int dataId) ;
494 virtual void aiStep() ;
496 virtual bool isFireImmune() const ;
498 virtual
void checkMovementStats(::
Vec3 const& d);
500 virtual ::
HashedString getCurrentStructureFeature() const;
502 virtual
bool isAutoJumpEnabled() const;
504 virtual ::
Vec3 getInterpolatedRidingOffset(
float,
int const) const ;
506 virtual
void passengerTick() ;
510 virtual
void remove() ;
512 virtual
void respawn();
514 virtual
bool shouldDropDeathLoot() const ;
518 virtual
void dropEquipmentOnDeath() ;
520 virtual
void clearVanishEnchantedItemsOnDeath() ;
522 virtual
bool drop(::
ItemStack const& item,
bool const randomly) ;
524 virtual
void resetRot();
526 virtual
void resetUserPos(::ActorResetRule resetRule) ;
528 virtual
bool isInTrialMode();
530 virtual
void setSpeed(
float _speed) ;
532 virtual
int getItemUseDuration() const ;
534 virtual
float getItemUseStartupProgress() const ;
536 virtual
float getItemUseIntervalProgress() const ;
538 virtual
bool isBlocking() const ;
542 virtual
void handleEntityEvent(::ActorEvent
id,
int data) ;
544 virtual ::
std::vector<::
ItemStack const*> getAllHandEquipment() const ;
546 virtual ::
std::vector<::
ItemStack const*> getAllEquipment() const ;
550 virtual ::CommandPermissionLevel getCommandPermissionLevel() const ;
552 virtual ::
ActorHurtResult attack(::Actor& actor, ::SharedTypes::Legacy::ActorDamageCause const& cause) ;
554 virtual ::
ItemStack const& getCarriedItem() const ;
556 virtual
void setCarriedItem(::
ItemStack const& item) ;
558 virtual
void damageCarriedItemOnAttack(::Actor& target,
float damageDealtToTarget) ;
560 virtual
void openPortfolio();
565 virtual void openBook(
int bookSlot,
bool editable,
int page,
::BlockActor* lectern);
568 virtual void openTrading(
::ActorUniqueID const& uniqueID,
bool useNewScreen);
576 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc);
578 virtual void openInventory();
580 virtual void displayChatMessage(
581 ::std::string
const& author,
582 ::std::string
const& message,
583 ::std::optional<::std::string>
const filteredMessage
587 displayClientMessage(::std::string
const& message, ::std::optional<::std::string>
const filteredMessage);
589 virtual void displayTextObjectMessage(
591 ::std::string
const& fromXuid,
592 ::std::string
const& fromPlatformId
595 virtual void displayTextObjectWhisperMessage(
597 ::std::string
const& xuid,
598 ::std::string
const& platformId
601 virtual void displayTextObjectWhisperMessage(
602 ::std::string
const& message,
603 ::std::string
const& xuid,
604 ::std::string
const& platformId
607 virtual void displayWhisperMessage(
608 ::std::string
const& author,
609 ::std::string
const& message,
610 ::std::optional<::std::string>
const filteredMessage,
611 ::std::string
const& xuid,
612 ::std::string
const& platformId
615 virtual float getShadowRadius() const ;
617 virtual
bool isSleeping() const ;
619 virtual
void setSleeping(
bool val) ;
621 virtual ::BedSleepingResult startSleepInBed(::
BlockPos const& bedPos,
bool setsRespawn,
float sleepOffset);
623 virtual
void stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
625 virtual
bool canStartSleepInBed();
627 virtual
void sendInventory(
bool shouldSelectSlot) ;
629 virtual
void openSign(::
BlockPos const& position,
bool isFrontSide);
632 virtual void playEmote(::std::string
const&,
bool const);
634 virtual void playEmote(::std::string
const& pieceId,
bool const playChatMessage);
637 virtual bool isSilentObserver() const ;
639 virtual
void useItem(::
ItemStackBase& instance, ::ItemUseMethod itemUseMethod,
bool consumeItem) ;
641 virtual
bool isLoading() const;
643 virtual
bool isPlayerInitialized() const;
645 virtual
void stopLoading();
647 virtual
float getSpeed() const ;
649 virtual
void setPlayerGameType(::GameType gameType);
651 virtual
void initHUDContainerManager();
653 virtual
void emitCriticalHitParticles(::Actor const& target,
int particleCount);
655 virtual
bool isImmobile() const ;
657 virtual
void sendMotionPacketIfNeeded() ;
661 virtual uint getUserId() const;
663 virtual
void addExperience(
int xp);
665 virtual
void addLevels(
int levels);
667 virtual
void setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::
ItemStack const& item) ;
669 virtual
void setOffhandSlot(::
ItemStack const& item) ;
671 virtual ::
std::unique_ptr<::
Packet> tryCreateAddActorPacket() ;
677 virtual
void slotChanged(
688 virtual
void deleteContainerManager();
690 virtual ::
ItemStack const& getEquippedTotem() const ;
692 virtual
bool consumeTotem() ;
694 virtual
bool isActorRelevant(::Actor const& actor);
696 virtual
float getMapDecorationRotation() const ;
698 virtual
void teleportTo(
700 bool shouldStopRiding,
702 int sourceEntityType,
706 virtual
bool startRiding(::Actor& vehicle,
bool forceRiding) ;
708 virtual
void startSwimming() ;
710 virtual
void stopSwimming() ;
712 virtual
bool isTeacher() const = 0;
714 virtual
bool isExternalCommunicationAllowed() const = 0;
716 virtual
void onSuspension();
718 virtual
void onLinkedSlotsChanged();
720 virtual
bool canBePulledIntoVehicle() const ;
722 virtual
void feed(
int itemId) ;
729 virtual
void sendNetworkPacket(::
Packet& packet) const;
731 virtual
bool canExistWhenDisallowMob() const ;
733 virtual ::mce::Color getNameTagTextColor() const ;
735 virtual
bool canAddPassenger(::Actor& passenger) const ;
739 virtual
bool isSimulated() const;
741 virtual ::
std::
string getXuid() const;
745 virtual
bool canInteractWithOtherEntitiesInGame() const ;
747 virtual
bool canObstructSpawningAndBlockPlacement() const ;
749 virtual ::
std::optional<::
BlockPos> getLastDeathPos() const ;
753 virtual
bool hasDiedBefore() const ;
755 virtual
void doEnterWaterSplashEffect() ;
757 virtual
void doExitWaterSplashEffect() ;
764 virtual void requestMissingSubChunk(
::SubChunkPos const& scp);
767 virtual uchar getMaxChunkBuildRadius()
const;
769 virtual float causeFallDamageToActor(
float distance,
float multiplier,
::ActorDamageSource source) ;
772 virtual void setBehaviorCommandStatus(::std::string
const&, ::BehaviorStatus);
774 virtual void setBehaviorCommandStatus(::std::string
const& name, ::BehaviorStatus status);
778 virtual void setRemotePlayerTicked(
bool);
780 virtual void setRemotePlayerTicked(
bool ticked);
783 virtual ::std::unique_ptr<::ISparseContainerSetListener> createSparseContainerListener();
785 virtual void addChunksToQueue(::std::vector<::ChunkPos>
const& chunkPostions);
787 virtual ::ActorHurtResult
792 virtual void addAdditionalSaveData(
::CompoundTag& entityTag)
const ;
794 virtual void onMovePlayerPacketNormal(
::Vec3 const& pos,
::Vec2 const& rot,
float yHeadRot);
796 virtual bool _shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot,
::ItemStack const& item)
const
799 virtual bool _shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item)
const
802 virtual ::std::shared_ptr<::ChunkViewSource> _createChunkSource(
::ChunkSource& mainChunkSource);
806 virtual ::AnimationComponent& getAnimationComponent() ;
808 virtual ::HashedString
const& getActorRendererId() const ;
810 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const = 0;
812 virtual
void destroyEditorPlayer() = 0;
814 virtual
void _serverInitItemStackIds() ;
825 ::GameType playerGameType,
826 bool isHostingPlayer,
830 ::
std::
string const& deviceId,
831 ::PlayerAuthenticationType authType,
834 ::
std::
string const& platformId,
835 ::
std::
string const& platformOnlineId
839 MCAPI
bool _canChangeGameType(::GameType newGameType)
const;
842 MCAPI
bool _checkAndFixSpawnPosition(
844 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
845 bool adjustYToSolidGround,
847 bool positionFromSave
851 MCAPI
void _enterBedSleepState(
::BlockPos const& bedBlockPos,
float sleepOffset);
853 MCAPI
bool _findFallbackSpawnPosition(
855 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
856 uint
const maxDistance,
857 bool const checkStoredFallback
861 MCAPI
void _handleCarriedItemInteractText();
863 MCAPI
bool _isChunkSourceLoaded(
::Vec3 const& spawnPosition,
::BlockSource const& region)
const;
865 MCAPI
void _setPlayerGameType(::GameType gameType);
868 MCAPI ::BedSleepingResult _validateCanSleepInBed(
::BlockPos const& bedBlockPos)
const;
870 MCAPI ::BedSleepingResult _validateSleepConditions(
::BlockPos const& bedBlockPos)
const;
873 MCAPI
bool _validateSpawnPositionAvailability(
876 ::Vec3 const*
const AABBoffset
879 MCAPI ::ActorHurtResult attack(
881 ::SharedTypes::Legacy::ActorDamageCause
const& cause,
885 MCAPI
bool canJump();
887 MCAPI
bool canOpenContainerScreen();
889 MCAPI
bool canStackInOffhand(
::ItemStack const& item)
const;
891 MCAPI
bool canUseAbility(::AbilitiesIndex abilityIndex)
const;
893 MCAPI
bool canUseOperatorBlocks()
const;
895 MCAPI
void causeFoodExhaustion(
float exhaustionAmount);
899 MCAPI
bool checkNeedAutoJump(
float inputMoveX,
float inputMoveZ);
901 MCAPI
bool checkSpawnBlock(
::BlockSource const& region)
const;
903 MCAPI
void completeUsingItem();
906 MCAPI
void crackBlock(
::BlockPos const& pos, uchar face);
911 MCAPI
void eat(
int hungerValue,
float saturationModifier);
913 MCAPI
bool equippedArmorItemCanBeMoved(
::ItemStack const& item)
const;
917 MCFOLD ::LayeredAbilities
const& getAbilities()
const;
919 MCFOLD ::LayeredAbilities& getAbilities();
921 MCAPI ::Agent* getAgentIfAllowed(
bool callerCanAccessOtherAgents,
::ActorUniqueID callerAgentID)
const;
923 MCAPI ::SoundEventIdentifier getAttackHitSound()
const;
925 MCAPI ::SoundEventIdentifier getAttackMissSound()
const;
927 MCAPI ::std::string getChatDisplayName()
const;
929 MCAPI ::ItemStack
const& getCurrentActiveShield()
const;
931 MCAPI
float getDestroyProgress(
::Block const& block);
933 MCAPI ::DimensionType getExpectedSpawnDimensionId()
const;
935 MCAPI ::BlockPos
const& getExpectedSpawnPosition()
const;
937 MCAPI ::std::string getInteractText()
const;
939 MCAPI
int getItemCooldownLeft(
::HashedString const& category)
const;
941 MCAPI
int getItemCooldownLeft(uint64 categoryHash)
const;
944 MCAPI
float getItemCooldownProgress(
::HashedString const& category)
const;
947 MCAPI ::std::string getItemInteractText(
::Item const& item)
const;
949 MCAPI
int getMaxItemCooldownLeft()
const;
951 MCAPI ::AABB getPickupArea()
const;
953 MCAPI ::GameType getPlayerGameType()
const;
955 MCAPI ::PlayerPermissionLevel getPlayerPermissionLevel()
const;
957 MCAPI
float getSleepRotation()
const;
960 MCAPI
void handleMovePlayerPacket(
961 ::PlayerPositionModeComponent::PositionMode mode,
972 MCAPI ::InteractionResult interact(::Actor& actor,
::Vec3 const& location);
974 MCAPI
void inventoryChanged(
982 MCAPI
bool isEditorPlayer()
const;
984 MCAPI
bool isEquipmentHidden()
const;
986 MCAPI
bool isFlying()
const;
988 MCAPI
bool isForcedRespawn()
const;
990 MCAPI
bool isItemOnCooldown(
::HashedString const& category)
const;
993 MCAPI
bool isScoping()
const;
996 MCAPI
void playPredictiveSynchronizedSound(
1003 MCAPI
void playPredictiveSynchronizedSound(
1004 ::SharedTypes::Legacy::LevelSoundEvent type,
1014 MCAPI
void releaseUsingItem();
1016 MCAPI
void resetPlayerLevel();
1020 MCAPI
void setAgent(
::Agent* agent);
1023 MCAPI
void setBedRespawnPosition(
::BlockPos const& bedPosition);
1026 MCAPI
void setChunkRadius(uint chunkRadius);
1028 MCAPI
void setCommandPermissions(::CommandPermissionLevel permissions);
1030 MCAPI
void setContainerManagerModel(::std::shared_ptr<::ContainerManagerModel> manager);
1032 MCAPI
void setName(::std::string
const& newName);
1034 MCAPI
void setPlayerUIItem(::PlayerUISlot slot,
::ItemStack const& item,
bool forceBalance);
1038 MCAPI
void setRespawnPositionCandidate();
1040 MCAPI ::ItemStack
const& setSelectedSlot(
int slot);
1044 MCAPI
void startGliding();
1046 MCAPI
void startItemCooldown(
::Item const& item,
bool updateClient);
1048 MCAPI
void startItemCooldown(
::HashedString const& type,
int tickDuration,
bool updateClient);
1053 MCAPI
void startUsingItem(
::ItemStack const& instance,
int duration);
1055 MCAPI
void stopGliding();
1059 MCAPI
void stopUsingItem();
1061 MCAPI
bool take(::Actor& actor,
int,
int favoredSlot);
1063 MCAPI
bool tryStartGliding();
1070 MCAPI
bool updateEmoteMessageData(
::PersonaPiece const& emotePiece);
1073 MCAPI
void updateInventoryTransactions();
1077 MCAPI
void updateTouch();
1079 MCAPI
void useSelectedItem(::ItemUseMethod itemUseMethod,
bool consumeItem);
1085 MCAPI
static bool checkNeedAutoJump(
1089 float movementSpeed,
1096 MCAPI static ::std::optional<::SharedTypes::Legacy::LevelSoundEvent>
1097 getCustomHurtSound(::Mob
const& mob, ::SharedTypes::Legacy::ActorDamageCause cause);
1101 updatePlayerGameTypeEntityData(
::EntityContext& entity, ::GameType gameType, ::GameType defaultGameType);
1108 MCAPI static ::Attribute
const& EXHAUSTION();
1110 MCAPI static ::Attribute
const& EXPERIENCE();
1112 MCAPI static ::Attribute
const& HUNGER();
1114 MCAPI static ::Attribute
const& LEVEL();
1116 MCAPI static ::Attribute
const& SATURATION();
1125 ::GameType playerGameType,
1126 bool isHostingPlayer,
1128 ::SubClientId subid,
1130 ::std::string
const& deviceId,
1131 ::PlayerAuthenticationType authType,
1134 ::std::string
const& platformId,
1135 ::std::string
const& platformOnlineId
1148 MCAPI
void $initializeComponents(::ActorInitializationMethod method,
::VariantParameterList const& params);
1154 MCAPI
void $destroyRegion();
1156 MCAPI
void $suspendRegion();
1158 MCAPI
void $_fireDimensionChanged();
1160 MCAPI
bool $canChangeDimensionsUsingPortal()
const;
1165 MCAPI
void $tickWorld(
::Tick const&);
1167 MCAPI
void $tickWorld(
::Tick const& currentTick);
1170 MCAPI ::std::vector<::ChunkPos>
const& $getTickingOffsets()
const;
1172 MCAPI
void $normalTick();
1174 MCAPI
void $moveView();
1178 MCFOLD
void $onSynchedDataUpdate(
int dataId);
1180 MCAPI
void $aiStep();
1182 MCAPI
bool $isFireImmune()
const;
1184 MCFOLD
void $checkMovementStats(
::Vec3 const& d);
1186 MCAPI ::HashedString $getCurrentStructureFeature()
const;
1188 MCFOLD
bool $isAutoJumpEnabled()
const;
1190 MCAPI ::Vec3 $getInterpolatedRidingOffset(
float,
int const)
const;
1192 MCAPI
void $passengerTick();
1196 MCAPI
void $remove();
1198 MCAPI
void $respawn();
1200 MCAPI
bool $shouldDropDeathLoot()
const;
1204 MCAPI
void $dropEquipmentOnDeath();
1206 MCFOLD
void $clearVanishEnchantedItemsOnDeath();
1208 MCAPI
bool $drop(
::ItemStack const& item,
bool const randomly);
1210 MCFOLD
void $resetRot();
1212 MCAPI
void $resetUserPos(::ActorResetRule resetRule);
1214 MCFOLD
bool $isInTrialMode();
1216 MCAPI
void $setSpeed(
float _speed);
1218 MCAPI
int $getItemUseDuration()
const;
1220 MCAPI
float $getItemUseStartupProgress()
const;
1222 MCAPI
float $getItemUseIntervalProgress()
const;
1224 MCAPI
bool $isBlocking()
const;
1228 MCAPI
void $handleEntityEvent(::ActorEvent
id,
int data);
1230 MCAPI ::std::vector<::ItemStack const*> $getAllHandEquipment()
const;
1232 MCAPI ::std::vector<::ItemStack const*> $getAllEquipment()
const;
1236 MCAPI ::CommandPermissionLevel $getCommandPermissionLevel()
const;
1238 MCAPI ::ActorHurtResult $attack(::Actor& actor, ::SharedTypes::Legacy::ActorDamageCause
const& cause);
1240 MCAPI ::ItemStack
const& $getCarriedItem()
const;
1242 MCAPI
void $setCarriedItem(
::ItemStack const& item);
1244 MCAPI
void $damageCarriedItemOnAttack(::Actor& target,
float damageDealtToTarget);
1246 MCFOLD
void $openPortfolio();
1251 MCFOLD
void $openBook(
int bookSlot,
bool editable,
int page,
::BlockActor* lectern);
1254 MCFOLD
void $openTrading(
::ActorUniqueID const& uniqueID,
bool useNewScreen);
1262 MCFOLD
void $openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc);
1264 MCFOLD
void $openInventory();
1267 MCAPI
void $displayChatMessage(
1268 ::std::string
const& author,
1269 ::std::string
const& message,
1270 ::std::optional<::std::string>
const filteredMessage
1273 MCFOLD
void $displayChatMessage(
1274 ::std::string
const& author,
1275 ::std::string
const& message,
1276 ::std::optional<::std::string>
const filteredMessage
1281 $displayClientMessage(::std::string
const& message, ::std::optional<::std::string>
const filteredMessage);
1283 MCFOLD
void $displayTextObjectMessage(
1285 ::std::string
const& fromXuid,
1286 ::std::string
const& fromPlatformId
1289 MCFOLD
void $displayTextObjectWhisperMessage(
1291 ::std::string
const& xuid,
1292 ::std::string
const& platformId
1295 MCFOLD
void $displayTextObjectWhisperMessage(
1296 ::std::string
const& message,
1297 ::std::string
const& xuid,
1298 ::std::string
const& platformId
1301 MCFOLD
void $displayWhisperMessage(
1302 ::std::string
const& author,
1303 ::std::string
const& message,
1304 ::std::optional<::std::string>
const filteredMessage,
1305 ::std::string
const& xuid,
1306 ::std::string
const& platformId
1309 MCAPI
float $getShadowRadius()
const;
1311 MCAPI
bool $isSleeping()
const;
1313 MCAPI
void $setSleeping(
bool val);
1315 MCAPI ::BedSleepingResult $startSleepInBed(
::BlockPos const& bedPos,
bool setsRespawn,
float sleepOffset);
1317 MCAPI
void $stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
1319 MCAPI
bool $canStartSleepInBed();
1321 MCFOLD
void $sendInventory(
bool shouldSelectSlot);
1323 MCFOLD
void $openSign(
::BlockPos const& position,
bool isFrontSide);
1326 MCFOLD
void $playEmote(::std::string
const&,
bool const);
1328 MCFOLD
void $playEmote(::std::string
const& pieceId,
bool const playChatMessage);
1331 MCAPI
bool $isSilentObserver()
const;
1333 MCAPI
void $useItem(
::ItemStackBase& instance, ::ItemUseMethod itemUseMethod,
bool consumeItem);
1335 MCFOLD
bool $isLoading()
const;
1337 MCFOLD
bool $isPlayerInitialized()
const;
1339 MCFOLD
void $stopLoading();
1341 MCAPI
float $getSpeed()
const;
1343 MCAPI
void $setPlayerGameType(::GameType gameType);
1345 MCAPI
void $initHUDContainerManager();
1347 MCAPI
void $emitCriticalHitParticles(::Actor
const& target,
int particleCount);
1349 MCAPI
bool $isImmobile()
const;
1351 MCFOLD
void $sendMotionPacketIfNeeded();
1353 MCAPI ::IMinecraftEventing* $getEventing()
const;
1355 MCFOLD uint $getUserId()
const;
1357 MCAPI
void $addExperience(
int xp);
1359 MCAPI
void $addLevels(
int levels);
1361 MCAPI
void $setArmor(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item);
1363 MCAPI
void $setOffhandSlot(
::ItemStack const& item);
1365 MCAPI ::std::unique_ptr<::Packet> $tryCreateAddActorPacket();
1369 MCAPI
void $deleteContainerManager();
1371 MCAPI ::ItemStack
const& $getEquippedTotem()
const;
1373 MCAPI
bool $consumeTotem();
1375 MCFOLD
bool $isActorRelevant(::Actor
const& actor);
1377 MCFOLD
float $getMapDecorationRotation()
const;
1380 $teleportTo(
::Vec3 const& pos,
bool shouldStopRiding,
int cause,
int sourceEntityType,
bool keepVelocity);
1382 MCAPI
bool $startRiding(::Actor& vehicle,
bool forceRiding);
1384 MCAPI
void $startSwimming();
1386 MCAPI
void $stopSwimming();
1388 MCFOLD
void $onSuspension();
1390 MCFOLD
void $onLinkedSlotsChanged();
1392 MCFOLD
bool $canBePulledIntoVehicle()
const;
1394 MCAPI
void $feed(
int itemId);
1396 MCFOLD
void $sendNetworkPacket(
::Packet& packet)
const;
1398 MCFOLD
bool $canExistWhenDisallowMob()
const;
1400 MCAPI ::mce::Color $getNameTagTextColor()
const;
1402 MCAPI
bool $canAddPassenger(::Actor& passenger)
const;
1404 MCFOLD
bool $isSimulated()
const;
1406 MCAPI ::std::string $getXuid()
const;
1408 MCAPI ::PlayerMovementSettings
const& $getMovementSettings()
const;
1410 MCAPI
bool $canInteractWithOtherEntitiesInGame()
const;
1412 MCAPI
bool $canObstructSpawningAndBlockPlacement()
const;
1414 MCAPI ::std::optional<::BlockPos> $getLastDeathPos()
const;
1416 MCAPI ::std::optional<::DimensionType> $getLastDeathDimension()
const;
1418 MCAPI
bool $hasDiedBefore()
const;
1420 MCAPI
void $doEnterWaterSplashEffect();
1422 MCAPI
void $doExitWaterSplashEffect();
1424 MCFOLD ::std::optional<::PlayerPartyInfo> $getPartyInfo_UNTRUSTED()
const;
1429 MCFOLD
void $requestMissingSubChunk(
::SubChunkPos const& scp);
1432 MCFOLD uchar $getMaxChunkBuildRadius()
const;
1434 MCAPI
float $causeFallDamageToActor(
float distance,
float multiplier,
::ActorDamageSource source);
1437 MCFOLD
void $setBehaviorCommandStatus(::std::string
const&, ::BehaviorStatus);
1439 MCFOLD
void $setBehaviorCommandStatus(::std::string
const& name, ::BehaviorStatus status);
1443 MCFOLD
void $setRemotePlayerTicked(
bool);
1445 MCFOLD
void $setRemotePlayerTicked(
bool ticked);
1448 MCFOLD ::std::unique_ptr<::ISparseContainerSetListener> $createSparseContainerListener();
1450 MCFOLD
void $addChunksToQueue(::std::vector<::ChunkPos>
const& chunkPostions);
1452 MCAPI ::ActorHurtResult
1457 MCAPI
void $addAdditionalSaveData(
::CompoundTag& entityTag)
const;
1459 MCAPI
void $onMovePlayerPacketNormal(
::Vec3 const& pos,
::Vec2 const& rot,
float yHeadRot);
1461 MCAPI
bool $_shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot,
::ItemStack const& item)
const;
1463 MCAPI
bool $_shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item)
const;
1465 MCAPI ::std::shared_ptr<::ChunkViewSource> $_createChunkSource(
::ChunkSource& mainChunkSource);
1469 MCAPI ::AnimationComponent& $getAnimationComponent();
1471 MCAPI ::HashedString
const& $getActorRendererId()
const;
1473 MCFOLD
void $_serverInitItemStackIds();
1475 MCAPI ::std::unique_ptr<::BodyControl> $initBodyControl();