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, 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;
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);
577 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc);
579 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> data);
582 virtual void openInventory();
584 virtual void displayChatMessage(
585 ::std::string
const& author,
586 ::std::string
const& message,
587 ::std::optional<::std::string>
const filteredMessage
591 displayClientMessage(::std::string
const& message, ::std::optional<::std::string>
const filteredMessage);
593 virtual void displayTextObjectMessage(
595 ::std::string
const& fromXuid,
596 ::std::string
const& fromPlatformId
599 virtual void displayTextObjectWhisperMessage(
601 ::std::string
const& xuid,
602 ::std::string
const& platformId
605 virtual void displayTextObjectWhisperMessage(
606 ::std::string
const& message,
607 ::std::string
const& xuid,
608 ::std::string
const& platformId
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
619 virtual float getShadowRadius() const ;
621 virtual
bool isSleeping() const ;
623 virtual
void setSleeping(
bool val) ;
625 virtual ::BedSleepingResult startSleepInBed(::
BlockPos const& bedPos,
bool setsRespawn,
float sleepOffset);
627 virtual
void stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
629 virtual
bool canStartSleepInBed();
631 virtual
void sendInventory(
bool shouldSelectSlot) ;
633 virtual
void openSign(::
BlockPos const& position,
bool isFrontSide);
636 virtual void playEmote(::std::string
const&,
bool const);
638 virtual void playEmote(::std::string
const& pieceId,
bool const playChatMessage);
641 virtual bool isSilentObserver() const ;
643 virtual
void useItem(::
ItemStackBase& instance, ::ItemUseMethod itemUseMethod,
bool consumeItem) ;
645 virtual
bool isLoading() const;
647 virtual
bool isPlayerInitialized() const;
649 virtual
void stopLoading();
651 virtual
float getSpeed() const ;
653 virtual
void setPlayerGameType(::GameType gameType);
655 virtual
void initHUDContainerManager();
657 virtual
void emitCriticalHitParticles(::Actor const& target,
int particleCount);
659 virtual
bool isImmobile() const ;
661 virtual
void sendMotionPacketIfNeeded() ;
665 virtual uint getUserId() const;
667 virtual
void addExperience(
int xp);
669 virtual
void addLevels(
int levels);
671 virtual
void setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::
ItemStack const& item) ;
673 virtual
void setOffhandSlot(::
ItemStack const& item) ;
675 virtual ::
std::unique_ptr<::
Packet> tryCreateAddActorPacket() ;
681 virtual
void slotChanged(
692 virtual
void deleteContainerManager();
694 virtual ::
ItemStack const& getEquippedTotem() const ;
696 virtual
bool consumeTotem() ;
698 virtual
bool isActorRelevant(::Actor const& actor);
700 virtual
float getMapDecorationRotation() const ;
702 virtual
void teleportTo(
704 bool shouldStopRiding,
706 int sourceEntityType,
710 virtual
bool startRiding(::Actor& vehicle,
bool forceRiding) ;
712 virtual
void startSwimming() ;
714 virtual
void stopSwimming() ;
716 virtual
bool isTeacher() const = 0;
718 virtual
void onSuspension();
720 virtual
void onLinkedSlotsChanged();
722 virtual
bool canBePulledIntoVehicle() const ;
724 virtual
void feed(
int itemId) ;
731 virtual
void sendNetworkPacket(::
Packet& packet) const;
733 virtual
bool canExistWhenDisallowMob() const ;
735 virtual ::mce::Color getNameTagTextColor() const ;
737 virtual
bool canAddPassenger(::Actor& passenger) const ;
741 virtual
bool isSimulated() const;
743 virtual ::
std::
string getXuid() const;
747 virtual
bool canFreeze() const ;
749 virtual
bool canInteractWithOtherEntitiesInGame() const ;
751 virtual
bool canObstructSpawningAndBlockPlacement() const ;
753 virtual ::
std::optional<::
BlockPos> getLastDeathPos() const ;
757 virtual
bool hasDiedBefore() const ;
759 virtual
void doEnterWaterSplashEffect() ;
761 virtual
void doExitWaterSplashEffect() ;
768 virtual void requestMissingSubChunk(
::SubChunkPos const& scp);
771 virtual uchar getMaxChunkBuildRadius()
const;
773 virtual float causeFallDamageToActor(
float distance,
float multiplier,
::ActorDamageSource source) ;
776 virtual void setBehaviorCommandStatus(::std::string
const&, ::BehaviorStatus);
778 virtual void setBehaviorCommandStatus(::std::string
const& name, ::BehaviorStatus status);
782 virtual void setRemotePlayerTicked(
bool);
784 virtual void setRemotePlayerTicked(
bool ticked);
787 virtual ::std::unique_ptr<::ISparseContainerSetListener> createSparseContainerListener();
789 virtual void addChunksToQueue(::std::vector<::ChunkPos>
const& chunkPostions);
791 virtual ::ActorHurtResult
796 virtual void addAdditionalSaveData(
::CompoundTag& entityTag)
const ;
798 virtual void onMovePlayerPacketNormal(
::Vec3 const& pos,
::Vec2 const& rot,
float yHeadRot);
800 virtual bool _shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot,
::ItemStack const& item)
const
803 virtual bool _shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item)
const
806 virtual ::std::shared_ptr<::ChunkViewSource> _createChunkSource(
::ChunkSource& mainChunkSource);
810 virtual ::AnimationComponent& getAnimationComponent() ;
812 virtual ::HashedString
const& getActorRendererId() const ;
814 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const = 0;
816 virtual
void destroyEditorPlayer() = 0;
818 virtual
void _serverInitItemStackIds() ;
829 ::GameType playerGameType,
830 bool isHostingPlayer,
834 ::
std::
string const& deviceId,
835 ::PlayerAuthenticationType authType,
838 ::
std::
string const& platformId,
839 ::
std::
string const& platformOnlineId
843 MCAPI
bool _canChangeGameType(::GameType newGameType)
const;
846 MCAPI
bool _checkAndFixSpawnPosition(
848 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
849 bool adjustYToSolidGround,
851 bool positionFromSave
855 MCAPI
void _enterBedSleepState(
::BlockPos const& bedBlockPos,
float sleepOffset);
857 MCAPI
bool _findFallbackSpawnPosition(
859 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
860 uint
const maxDistance,
861 bool const checkStoredFallback
865 MCAPI
void _handleCarriedItemInteractText();
867 MCAPI
bool _isChunkSourceLoaded(
::Vec3 const& spawnPosition,
::BlockSource const& region)
const;
869 MCAPI
void _setPlayerGameType(::GameType gameType);
872 MCAPI ::BedSleepingResult _validateCanSleepInBed(
::BlockPos const& bedBlockPos)
const;
874 MCAPI ::BedSleepingResult _validateSleepConditions(
::BlockPos const& bedBlockPos)
const;
877 MCAPI
bool _validateSpawnPositionAvailability(
880 ::Vec3 const*
const AABBoffset
883 MCAPI ::ActorHurtResult attack(
885 ::SharedTypes::Legacy::ActorDamageCause
const& cause,
889 MCAPI
bool canJump();
891 MCAPI
bool canOpenContainerScreen();
893 MCAPI
bool canStackInOffhand(
::ItemStack const& item)
const;
895 MCAPI
bool canUseAbility(::AbilitiesIndex abilityIndex)
const;
897 MCAPI
bool canUseOperatorBlocks()
const;
899 MCAPI
void causeFoodExhaustion(
float exhaustionAmount);
903 MCAPI
bool checkNeedAutoJump(
float inputMoveX,
float inputMoveZ);
905 MCAPI
bool checkSpawnBlock(
::BlockSource const& region)
const;
907 MCAPI
void completeUsingItem();
910 MCAPI
void crackBlock(
::BlockPos const& pos, uchar face);
915 MCAPI
void eat(
int hungerValue,
float saturationModifier);
917 MCAPI
bool equippedArmorItemCanBeMoved(
::ItemStack const& item)
const;
921 MCFOLD ::LayeredAbilities
const& getAbilities()
const;
923 MCFOLD ::LayeredAbilities& getAbilities();
925 MCAPI ::Agent* getAgentIfAllowed(
bool callerCanAccessOtherAgents,
::ActorUniqueID callerAgentID)
const;
927 MCAPI ::SoundEventIdentifier getAttackHitSound()
const;
929 MCAPI ::SoundEventIdentifier getAttackMissSound()
const;
931 MCAPI ::std::string getChatDisplayName()
const;
933 MCAPI ::ItemStack
const& getCurrentActiveShield()
const;
935 MCAPI
float getDestroyProgress(
::Block const& block);
937 MCAPI ::DimensionType getExpectedSpawnDimensionId()
const;
939 MCAPI ::BlockPos
const& getExpectedSpawnPosition()
const;
941 MCAPI ::std::string getInteractText()
const;
943 MCAPI
int getItemCooldownLeft(
::HashedString const& category)
const;
945 MCAPI
int getItemCooldownLeft(uint64 categoryHash)
const;
948 MCAPI
float getItemCooldownProgress(
::HashedString const& category)
const;
951 MCAPI ::std::string getItemInteractText(
::Item const& item)
const;
953 MCAPI
int getMaxItemCooldownLeft()
const;
955 MCAPI ::AABB getPickupArea()
const;
957 MCAPI ::GameType getPlayerGameType()
const;
959 MCAPI ::PlayerPermissionLevel getPlayerPermissionLevel()
const;
961 MCAPI
float getSleepRotation()
const;
964 MCAPI
void handleMovePlayerPacket(
965 ::PlayerPositionModeComponent::PositionMode mode,
976 MCAPI ::InteractionResult interact(::Actor& actor,
::Vec3 const& location);
978 MCAPI
void inventoryChanged(
986 MCAPI
bool isEditorPlayer()
const;
988 MCAPI
bool isEquipmentHidden()
const;
990 MCAPI
bool isFlying()
const;
992 MCAPI
bool isForcedRespawn()
const;
995 MCAPI
bool isInRaid()
const;
998 MCAPI
bool isItemOnCooldown(
::HashedString const& category)
const;
1001 MCAPI
bool isScoping()
const;
1004 MCAPI
void playPredictiveSynchronizedSound(
1011 MCAPI
void playPredictiveSynchronizedSound(
1012 ::SharedTypes::Legacy::LevelSoundEvent type,
1019 MCAPI
void recheckSpawnPosition();
1026 MCAPI
void releaseUsingItem();
1028 MCAPI
void resetPlayerLevel();
1032 MCAPI
void setAgent(
::Agent* agent);
1035 MCAPI
void setBedRespawnPosition(
::BlockPos const& bedPosition);
1038 MCAPI
void setChunkRadius(uint chunkRadius);
1040 MCAPI
void setCommandPermissions(::CommandPermissionLevel permissions);
1042 MCAPI
void setContainerManagerModel(::std::shared_ptr<::ContainerManagerModel> manager);
1044 MCAPI
void setName(::std::string
const& newName);
1046 MCAPI
void setPlayerUIItem(::PlayerUISlot slot,
::ItemStack const& item,
bool forceBalance);
1050 MCAPI
void setRespawnPositionCandidate();
1052 MCAPI ::ItemStack
const& setSelectedSlot(
int slot);
1056 MCAPI
void startGliding();
1058 MCAPI
void startItemCooldown(
::Item const& item,
bool updateClient);
1060 MCAPI
void startItemCooldown(
::HashedString const& type,
int tickDuration,
bool updateClient);
1065 MCAPI
void startUsingItem(
::ItemStack const& instance,
int duration);
1067 MCAPI
void stopGliding();
1071 MCAPI
void stopUsingItem();
1073 MCAPI
bool take(::Actor& actor,
int,
int favoredSlot);
1075 MCAPI
bool tryStartGliding();
1082 MCAPI
bool updateEmoteMessageData(
::PersonaPiece const& emotePiece);
1085 MCAPI
void updateInventoryTransactions();
1089 MCAPI
void updateTouch();
1091 MCAPI
void useSelectedItem(::ItemUseMethod itemUseMethod,
bool consumeItem);
1097 MCAPI
static bool checkNeedAutoJump(
1101 float movementSpeed,
1108 MCAPI static ::std::optional<::SharedTypes::Legacy::LevelSoundEvent>
1109 getCustomHurtSound(::Mob
const& mob, ::SharedTypes::Legacy::ActorDamageCause cause);
1113 updatePlayerGameTypeEntityData(
::EntityContext& entity, ::GameType gameType, ::GameType defaultGameType);
1120 MCAPI static ::Attribute
const& EXHAUSTION();
1122 MCAPI static ::Attribute
const& EXPERIENCE();
1124 MCAPI static ::Attribute
const& HUNGER();
1126 MCAPI static ::Attribute
const& LEVEL();
1128 MCAPI static ::Attribute
const& SATURATION();
1137 ::GameType playerGameType,
1138 bool isHostingPlayer,
1140 ::SubClientId subid,
1142 ::std::string
const& deviceId,
1143 ::PlayerAuthenticationType authType,
1146 ::std::string
const& platformId,
1147 ::std::string
const& platformOnlineId
1160 MCAPI
void $initializeComponents(::ActorInitializationMethod method,
::VariantParameterList const& params);
1166 MCAPI
void $destroyRegion();
1168 MCAPI
void $suspendRegion();
1170 MCAPI
void $_fireDimensionChanged();
1172 MCAPI
bool $canChangeDimensionsUsingPortal()
const;
1177 MCAPI
void $tickWorld(
::Tick const&);
1179 MCAPI
void $tickWorld(
::Tick const& currentTick);
1182 MCAPI ::std::vector<::ChunkPos>
const& $getTickingOffsets()
const;
1184 MCAPI
void $normalTick();
1186 MCAPI
void $moveView();
1190 MCFOLD
void $onSynchedDataUpdate(
int dataId);
1192 MCAPI
void $aiStep();
1194 MCAPI
bool $isFireImmune()
const;
1196 MCFOLD
void $checkMovementStats(
::Vec3 const& d);
1198 MCAPI ::HashedString $getCurrentStructureFeature()
const;
1200 MCFOLD
bool $isAutoJumpEnabled()
const;
1202 MCAPI ::Vec3 $getInterpolatedRidingOffset(
float,
int const)
const;
1204 MCAPI
void $passengerTick();
1208 MCAPI
void $remove();
1210 MCAPI
void $respawn();
1212 MCAPI
bool $shouldDropDeathLoot()
const;
1216 MCAPI
void $dropEquipmentOnDeath();
1218 MCFOLD
void $clearVanishEnchantedItemsOnDeath();
1220 MCAPI
bool $drop(
::ItemStack const& item,
bool const randomly);
1222 MCFOLD
void $resetRot();
1224 MCAPI
void $resetUserPos(::ActorResetRule resetRule);
1226 MCFOLD
bool $isInTrialMode();
1228 MCAPI
void $setSpeed(
float _speed);
1230 MCAPI
int $getItemUseDuration()
const;
1232 MCAPI
float $getItemUseStartupProgress()
const;
1234 MCAPI
float $getItemUseIntervalProgress()
const;
1236 MCAPI
bool $isBlocking()
const;
1240 MCAPI
void $handleEntityEvent(::ActorEvent
id,
int data);
1242 MCAPI ::std::vector<::ItemStack const*> $getAllHandEquipment()
const;
1244 MCAPI ::std::vector<::ItemStack const*> $getAllEquipment()
const;
1248 MCAPI ::CommandPermissionLevel $getCommandPermissionLevel()
const;
1250 MCAPI ::ActorHurtResult $attack(::Actor& actor, ::SharedTypes::Legacy::ActorDamageCause
const& cause);
1252 MCAPI ::ItemStack
const& $getCarriedItem()
const;
1254 MCAPI
void $setCarriedItem(
::ItemStack const& item);
1256 MCAPI
void $damageCarriedItemOnAttack(::Actor& target,
float damageDealtToTarget);
1258 MCFOLD
void $openPortfolio();
1263 MCFOLD
void $openBook(
int bookSlot,
bool editable,
int page,
::BlockActor* lectern);
1266 MCFOLD
void $openTrading(
::ActorUniqueID const& uniqueID,
bool useNewScreen);
1275 MCFOLD
void $openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc);
1277 MCFOLD
void $openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> data);
1280 MCFOLD
void $openInventory();
1283 MCAPI
void $displayChatMessage(
1284 ::std::string
const& author,
1285 ::std::string
const& message,
1286 ::std::optional<::std::string>
const filteredMessage
1289 MCFOLD
void $displayChatMessage(
1290 ::std::string
const& author,
1291 ::std::string
const& message,
1292 ::std::optional<::std::string>
const filteredMessage
1297 $displayClientMessage(::std::string
const& message, ::std::optional<::std::string>
const filteredMessage);
1299 MCFOLD
void $displayTextObjectMessage(
1301 ::std::string
const& fromXuid,
1302 ::std::string
const& fromPlatformId
1305 MCFOLD
void $displayTextObjectWhisperMessage(
1307 ::std::string
const& xuid,
1308 ::std::string
const& platformId
1311 MCFOLD
void $displayTextObjectWhisperMessage(
1312 ::std::string
const& message,
1313 ::std::string
const& xuid,
1314 ::std::string
const& platformId
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
1325 MCAPI
float $getShadowRadius()
const;
1327 MCAPI
bool $isSleeping()
const;
1329 MCAPI
void $setSleeping(
bool val);
1331 MCAPI ::BedSleepingResult $startSleepInBed(
::BlockPos const& bedPos,
bool setsRespawn,
float sleepOffset);
1333 MCAPI
void $stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
1335 MCAPI
bool $canStartSleepInBed();
1337 MCFOLD
void $sendInventory(
bool shouldSelectSlot);
1339 MCFOLD
void $openSign(
::BlockPos const& position,
bool isFrontSide);
1342 MCFOLD
void $playEmote(::std::string
const&,
bool const);
1344 MCFOLD
void $playEmote(::std::string
const& pieceId,
bool const playChatMessage);
1347 MCAPI
bool $isSilentObserver()
const;
1349 MCAPI
void $useItem(
::ItemStackBase& instance, ::ItemUseMethod itemUseMethod,
bool consumeItem);
1351 MCFOLD
bool $isLoading()
const;
1353 MCFOLD
bool $isPlayerInitialized()
const;
1355 MCFOLD
void $stopLoading();
1357 MCAPI
float $getSpeed()
const;
1359 MCAPI
void $setPlayerGameType(::GameType gameType);
1361 MCAPI
void $initHUDContainerManager();
1363 MCAPI
void $emitCriticalHitParticles(::Actor
const& target,
int particleCount);
1365 MCAPI
bool $isImmobile()
const;
1367 MCFOLD
void $sendMotionPacketIfNeeded();
1369 MCAPI ::IMinecraftEventing* $getEventing()
const;
1371 MCFOLD uint $getUserId()
const;
1373 MCAPI
void $addExperience(
int xp);
1375 MCAPI
void $addLevels(
int levels);
1377 MCAPI
void $setArmor(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item);
1379 MCAPI
void $setOffhandSlot(
::ItemStack const& item);
1381 MCAPI ::std::unique_ptr<::Packet> $tryCreateAddActorPacket();
1385 MCAPI
void $deleteContainerManager();
1387 MCAPI ::ItemStack
const& $getEquippedTotem()
const;
1389 MCAPI
bool $consumeTotem();
1391 MCFOLD
bool $isActorRelevant(::Actor
const& actor);
1393 MCFOLD
float $getMapDecorationRotation()
const;
1396 $teleportTo(
::Vec3 const& pos,
bool shouldStopRiding,
int cause,
int sourceEntityType,
bool keepVelocity);
1398 MCAPI
bool $startRiding(::Actor& vehicle,
bool forceRiding);
1400 MCAPI
void $startSwimming();
1402 MCAPI
void $stopSwimming();
1404 MCFOLD
void $onSuspension();
1406 MCFOLD
void $onLinkedSlotsChanged();
1408 MCFOLD
bool $canBePulledIntoVehicle()
const;
1410 MCAPI
void $feed(
int itemId);
1412 MCFOLD
void $sendNetworkPacket(
::Packet& packet)
const;
1414 MCFOLD
bool $canExistWhenDisallowMob()
const;
1416 MCAPI ::mce::Color $getNameTagTextColor()
const;
1418 MCAPI
bool $canAddPassenger(::Actor& passenger)
const;
1420 MCFOLD
bool $isSimulated()
const;
1422 MCAPI ::std::string $getXuid()
const;
1424 MCAPI ::PlayerMovementSettings
const& $getMovementSettings()
const;
1426 MCAPI
bool $canFreeze()
const;
1428 MCAPI
bool $canInteractWithOtherEntitiesInGame()
const;
1430 MCAPI
bool $canObstructSpawningAndBlockPlacement()
const;
1432 MCAPI ::std::optional<::BlockPos> $getLastDeathPos()
const;
1434 MCAPI ::std::optional<::DimensionType> $getLastDeathDimension()
const;
1436 MCAPI
bool $hasDiedBefore()
const;
1438 MCAPI
void $doEnterWaterSplashEffect();
1440 MCAPI
void $doExitWaterSplashEffect();
1442 MCFOLD ::std::optional<::PlayerPartyInfo> $getPartyInfo_UNTRUSTED()
const;
1447 MCFOLD
void $requestMissingSubChunk(
::SubChunkPos const& scp);
1450 MCFOLD uchar $getMaxChunkBuildRadius()
const;
1452 MCAPI
float $causeFallDamageToActor(
float distance,
float multiplier,
::ActorDamageSource source);
1455 MCFOLD
void $setBehaviorCommandStatus(::std::string
const&, ::BehaviorStatus);
1457 MCFOLD
void $setBehaviorCommandStatus(::std::string
const& name, ::BehaviorStatus status);
1461 MCFOLD
void $setRemotePlayerTicked(
bool);
1463 MCFOLD
void $setRemotePlayerTicked(
bool ticked);
1466 MCFOLD ::std::unique_ptr<::ISparseContainerSetListener> $createSparseContainerListener();
1468 MCFOLD
void $addChunksToQueue(::std::vector<::ChunkPos>
const& chunkPostions);
1470 MCAPI ::ActorHurtResult
1475 MCAPI
void $addAdditionalSaveData(
::CompoundTag& entityTag)
const;
1477 MCAPI
void $onMovePlayerPacketNormal(
::Vec3 const& pos,
::Vec2 const& rot,
float yHeadRot);
1479 MCAPI
bool $_shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot,
::ItemStack const& item)
const;
1481 MCAPI
bool $_shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item)
const;
1483 MCAPI ::std::shared_ptr<::ChunkViewSource> $_createChunkSource(
::ChunkSource& mainChunkSource);
1487 MCAPI ::AnimationComponent& $getAnimationComponent();
1489 MCAPI ::HashedString
const& $getActorRendererId()
const;
1491 MCFOLD
void $_serverInitItemStackIds();
1493 MCAPI ::std::unique_ptr<::BodyControl> $initBodyControl();