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;
182 ::ll::TypedStorage<4, 4, ::DimensionType> mRespawnDimensionId;
183 ::ll::TypedStorage<4, 12, ::Vec3> mActualRespawnPosition;
184 ::ll::TypedStorage<4, 12, ::BlockPos> mRequestedRespawnPosition;
185 ::ll::TypedStorage<1, 1, bool> mHasRespawnPosition;
186 ::ll::TypedStorage<4, 12, ::BlockPos> mSharedSpawnPosition;
187 ::ll::TypedStorage<1, 1, bool> mRespawnReady;
188 ::ll::TypedStorage<4, 12, ::Vec3> mPlayerPos;
189 ::ll::TypedStorage<1, 1, bool> mIsForcedRespawn;
190 ::ll::TypedStorage<1, 1, bool> mIsAdventure;
191 ::ll::TypedStorage<1, 1, bool> mIsFlyingOrNotOverworld;
192 ::ll::TypedStorage<1, 1, bool> mPositionLoadedFromSave;
200 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
201 ::ll::TypedStorage<4, 4, ::PlayerSpawnFallbackType> mSpawnFallbackType;
209 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
210 ::ll::TypedStorage<1, 1, bool> mIsAboveLeaves;
218 ::ll::TypedStorage<4, 12, ::BlockPos> mSpawnBlockPos;
219 ::ll::TypedStorage<4, 12, ::BlockPos> mPlayerPosition;
220 ::ll::TypedStorage<4, 4, ::DimensionType> mDimension;
227 setSpawnPoint(
::BlockPos const& playerPosition, ::DimensionType dimension,
::BlockPos const& spawnBlock);
231 using PlayerFlagIDType = schar;
233 using PlayerListenerList = ::std::vector<::PlayerListener*>;
244 LLNDAPI SubClientId
const& getClientSubId()
const;
246 LLNDAPI
int getSelectedItemSlot()
const;
274 LLNDAPI std::optional<NetworkPeer::NetworkStatus> getNetworkStatus()
const;
285 LLAPI
void setAbility(::AbilitiesIndex index,
bool value);
312 LLNDAPI
static Player* tryGetFromEntity(
::EntityContext& entity,
bool includeRemoved);
317 ::ll::TypedStorage<8, 24, ::std::vector<ushort>> mFroglights;
318 ::ll::TypedStorage<4, 4, float const> mSneakHeight;
319 ::ll::TypedStorage<4, 4, float const> mSneakOffset;
320 ::ll::TypedStorage<4, 4, int> mScore;
321 ::ll::TypedStorage<4, 4, ::BuildPlatform> mBuildPlatform;
322 ::ll::TypedStorage<8, 32, ::std::string> mUniqueName;
323 ::ll::TypedStorage<8, 32, ::std::string> mServerId;
324 ::ll::TypedStorage<8, 32, ::std::string> mSelfSignedId;
325 ::ll::TypedStorage<8, 32, ::std::string> mPlatformOfflineId;
326 ::ll::TypedStorage<8, 8, uint64> mClientRandomId;
327 ::ll::TypedStorage<8, 32, ::std::string> mPlatformId;
328 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mPendingVehicleID;
329 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mPendingLeftShoulderPassengerID;
330 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mPendingRightShoulderPassengerID;
331 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mInteractTarget;
332 ::ll::TypedStorage<4, 12, ::Vec3> mInteractTargetPos;
333 ::ll::TypedStorage<1, 1, bool> mHasFakeInventory;
334 ::ll::TypedStorage<1, 1, bool> mIsRegionSuspended;
335 ::ll::TypedStorage<1, 1, bool> mUpdateMobs;
336 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ChunkViewSource>> mChunkSource;
337 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ChunkViewSource>> mSpawnChunkSource;
338 ::ll::TypedStorage<4, 12, ::Vec3> mCapePosO;
339 ::ll::TypedStorage<4, 12, ::Vec3> mCapePos;
340 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ContainerManagerModel>> mContainerManager;
347 mContainerManagerSubscribers;
348 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerInventory>> mInventory;
349 ::ll::TypedStorage<4, 20, ::InventoryOptions> mInventoryOptions;
350 ::ll::TypedStorage<4, 12, ::FurnaceOptions> mFurnaceOptions;
351 ::ll::TypedStorage<4, 12, ::FurnaceOptions> mBlastFurnaceOptions;
352 ::ll::TypedStorage<4, 12, ::FurnaceOptions> mSmokerOptions;
353 ::ll::TypedStorage<4, 4, float> mDistanceSinceTransformEvent;
354 ::ll::TypedStorage<8, 24, ::std::vector<::ItemInstance>> mCreativeItemList;
355 ::ll::TypedStorage<8, 32, ::std::string> mPlatformOnlineId;
356 ::ll::TypedStorage<4, 4, ::Player::SpawnPositionState> mSpawnPositionState;
357 ::ll::TypedStorage<4, 4, ::Player::SpawnPositionSource> mSpawnPositionSource;
358 ::ll::TypedStorage<4, 12, ::Vec3> mSpawnPositioningTestPosition;
359 ::ll::TypedStorage<4, 4, uint> mRespawnChunkBuilderPolicyHandle;
360 ::ll::TypedStorage<4, 64, ::Player::CachedSpawnData> mCachedSpawnData;
361 ::ll::TypedStorage<8, 16, ::OwnerPtr<::BlockSource>> mSpawnBlockSource;
362 ::ll::TypedStorage<8, 56, ::Stopwatch> mRespawnStopwatch_Searching;
363 ::ll::TypedStorage<4, 12, ::Vec3> mRespawnOriginalPosition;
364 ::ll::TypedStorage<4, 4, ::DimensionType> mRespawnOriginalDimension;
365 ::ll::TypedStorage<8, 32, ::std::string> mRespawnMessage;
366 ::ll::TypedStorage<1, 1, bool> mRespawnReady;
367 ::ll::TypedStorage<1, 1, bool> mIsInitialSpawnDone;
368 ::ll::TypedStorage<1, 1, bool> mRespawningFromTheEnd;
369 ::ll::TypedStorage<1, 1, bool> mPositionLoadedFromSave;
370 ::ll::TypedStorage<1, 1, bool> mBlockRespawnUntilClientMessage;
371 ::ll::TypedStorage<1, 1, bool> mHasSeenCredits;
372 ::ll::TypedStorage<4, 8, ::std::optional<::PlayerSpawnFallbackType>> mSpawnFallbackType;
373 ::ll::TypedStorage<4, 16, ::std::optional<::Vec3>> mSpawnFallbackPosition;
374 ::ll::TypedStorage<8, 168, ::PlayerItemInUse> mItemInUse;
375 ::ll::TypedStorage<4, 4, ::ActorType> mLastHurtBy;
376 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mPreviousInteractEntity;
377 ::ll::TypedStorage<4, 4, int> mPreviousCarriedItem;
378 ::ll::TypedStorage<4, 4, int> mEmoteTicks;
379 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::NetworkChunkPublisher>> mChunkPublisherView;
380 ::ll::TypedStorage<8, 8, ::PacketSender&> mPacketSender;
381 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::HudContainerManagerModel>> mHudContainerManagerModel;
382 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::EnderChestContainer>> mEnderChestInventory;
383 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> mTrackedBossIDs;
384 ::ll::TypedStorage<8, 136, ::ItemGroup> mCursorSelectedItemGroup;
385 ::ll::TypedStorage<8, 440, ::PlayerUIContainer> mPlayerUIContainer;
386 ::ll::TypedStorage<8, 48, ::InventoryTransactionManager> mTransactionManager;
387 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::GameMode>> mGameMode;
388 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerRespawnRandomizer>> mSpawnRandomizer;
389 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SerializedSkinRef>> mSkin;
390 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemStackNetManagerBase>> mItemStackNetManager;
391 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mUIAnimationComponent;
392 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mMapAnimationComponent;
393 ::ll::TypedStorage<4, 28, ::Player::PlayerSpawnPoint> mPlayerRespawnPoint;
394 ::ll::TypedStorage<4, 4, float> mServerBuildRatio;
395 ::ll::TypedStorage<1, 1, ::SubClientId> mClientId;
396 ::ll::TypedStorage<1, 1, bool> mInteractDataDirty;
397 ::ll::TypedStorage<1, 1, bool> mShouldClientGenerateChunks;
398 ::ll::TypedStorage<8, 24, ::std::vector<::BiomeIdType>> mOceanBiomes;
399 ::ll::TypedStorage<1, 1, bool> mUseMapAnimationComponent;
400 ::ll::TypedStorage<1, 1, bool> mIsDeferredRenderingFirstPersonObjects;
401 ::ll::TypedStorage<1, 1, bool> mDestroyingBlock;
402 ::ll::TypedStorage<1, 1, bool> mPlayerLevelChanged;
403 ::ll::TypedStorage<4, 4, int> mPreviousLevelRequirement;
404 ::ll::TypedStorage<4, 4, int> mLastLevelUpTime;
405 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AnimationComponent>> mFirstPersonAnimationComponent;
406 ::ll::TypedStorage<8, 24, ::std::vector<::PlayerListener*>> mListeners;
407 ::ll::TypedStorage<4, 12, ::Vec3> mRespawnPositionCandidate;
408 ::ll::TypedStorage<4, 12, ::Vec3> mPreDimensionTransferSpawnPosition;
409 ::ll::TypedStorage<4, 4, int> mEnchantmentSeed;
410 ::ll::TypedStorage<8, 24, ::std::vector<uint>> mOnScreenAnimationTextures;
411 ::ll::TypedStorage<4, 4, int> mOnScreenAnimationTicks;
412 ::ll::TypedStorage<4, 4, uint> mChunkRadius;
413 ::ll::TypedStorage<4, 4, int> mMapIndex;
414 ::ll::TypedStorage<4, 4, float> mElytraVolume;
415 ::ll::TypedStorage<8, 8, uint64> mElytraLoop;
416 ::ll::TypedStorage<8, 8, int64> mStartedBlockingTimeStamp;
417 ::ll::TypedStorage<8, 8, int64> mBlockedUsingShieldTimeStamp;
418 ::ll::TypedStorage<8, 8, int64> mBlockedUsingDamagedShieldTimeStamp;
419 ::ll::TypedStorage<8, 32, ::std::string> mName;
420 ::ll::TypedStorage<8, 32, ::std::string> mLastEmotePlayed;
421 ::ll::TypedStorage<8, 8, int64> mEmoteEasterEggEndTime;
422 ::ll::TypedStorage<4, 4, uint> mEmoteMessageCount;
423 ::ll::TypedStorage<8, 32, ::std::string> mDeviceId;
424 ::ll::TypedStorage<1, 1, bool> mFlagClientForBAIReset;
425 ::ll::TypedStorage<1, 1, bool> mSendInventoryOptionsToClient;
426 ::ll::TypedStorage<1, 1, bool> mIsHostingPlayer;
427 ::ll::TypedStorage<1, 1, bool> mPrevBlockedUsingShield;
428 ::ll::TypedStorage<1, 1, bool> mPrevBlockedUsingDamagedShield;
429 ::ll::TypedStorage<1, 1, bool> mUsedPotion;
430 ::ll::TypedStorage<8, 8, ::PlayerDestroyProgressCacheComponent&> mDestroyProgressCache;
435 Player& operator=(Player
const&);
436 Player(Player
const&);
451 virtual void destroyRegion();
453 virtual void suspendRegion();
455 virtual void _fireDimensionChanged();
457 virtual bool canChangeDimensionsUsingPortal() const ;
459 virtual
void changeDimensionWithCredits(::DimensionType dimension);
461 virtual
void tickWorld(::
Tick const& currentTick);
465 virtual ::
std::vector<::
ChunkPos> const& getTickingOffsets() const;
467 virtual
void normalTick() ;
469 virtual
void moveView();
471 virtual
void moveSpawnView(::
Vec3 const& spawnPosition, ::DimensionType dimensionType);
473 virtual
void onSynchedDataUpdate(
int dataId) ;
475 virtual
void aiStep() ;
477 virtual
bool isFireImmune() const ;
479 virtual
void checkMovementStats(::
Vec3 const& d);
481 virtual ::
HashedString getCurrentStructureFeature() const;
483 virtual
bool isAutoJumpEnabled() const;
485 virtual ::
Vec3 getInterpolatedRidingOffset(
float,
int const) const ;
487 virtual
void passengerTick() ;
491 virtual
void remove() ;
493 virtual
void respawn();
495 virtual
bool shouldDropDeathLoot() const ;
499 virtual
void dropEquipmentOnDeath() ;
501 virtual
void clearVanishEnchantedItemsOnDeath() ;
503 virtual
bool drop(::
ItemStack const& item,
bool const randomly) ;
505 virtual
void resetRot();
507 virtual
void resetUserPos(::ActorResetRule resetRule) ;
509 virtual
bool isInTrialMode();
511 virtual
void setSpeed(
float _speed) ;
513 virtual
int getItemUseDuration() const ;
515 virtual
float getItemUseStartupProgress() const ;
517 virtual
float getItemUseIntervalProgress() const ;
519 virtual
bool isBlocking() const ;
523 virtual
void handleEntityEvent(::ActorEvent
id,
int data) ;
525 virtual ::
std::vector<::
ItemStack const*> getAllHandEquipment() const ;
527 virtual ::
std::vector<::
ItemStack const*> getAllEquipment() const ;
531 virtual ::CommandPermissionLevel getCommandPermissionLevel() const ;
533 virtual ::
ActorHurtResult attack(::Actor& actor, ::SharedTypes::Legacy::ActorDamageCause const& cause) ;
535 virtual ::
ItemStack const& getCarriedItem() const ;
537 virtual
void setCarriedItem(::
ItemStack const& item) ;
539 virtual
void damageCarriedItemOnAttack(::Actor& target,
float damageDealtToTarget) ;
541 virtual
void openPortfolio();
543 virtual
void openBook(
int bookSlot,
bool editable,
int page, ::
BlockActor* lectern);
545 virtual
void openTrading(::
ActorUniqueID const& uniqueID,
bool useNewScreen);
551 virtual
void openInventory();
553 virtual
void displayChatMessage(
554 ::
std::
string const& author,
555 ::
std::
string const& message,
556 ::
std::optional<::
std::
string> const filteredMessage
560 displayClientMessage(::
std::
string const& message, ::
std::optional<::
std::
string> const filteredMessage);
562 virtual
void displayTextObjectMessage(
564 ::
std::
string const& fromXuid,
565 ::
std::
string const& fromPlatformId
568 virtual
void displayTextObjectWhisperMessage(
570 ::
std::
string const& xuid,
571 ::
std::
string const& platformId
574 virtual
void displayTextObjectWhisperMessage(
575 ::
std::
string const& message,
576 ::
std::
string const& xuid,
577 ::
std::
string const& platformId
580 virtual
void displayWhisperMessage(
581 ::
std::
string const& author,
582 ::
std::
string const& message,
583 ::
std::optional<::
std::
string> const filteredMessage,
584 ::
std::
string const& xuid,
585 ::
std::
string const& platformId
588 virtual
float getShadowRadius() const ;
590 virtual
bool isSleeping() const ;
592 virtual
void setSleeping(
bool val) ;
594 virtual ::BedSleepingResult startSleepInBed(::
BlockPos const& bedBlockPos);
596 virtual
void stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
598 virtual
bool canStartSleepInBed();
600 virtual
void sendInventory(
bool shouldSelectSlot) ;
602 virtual
void openSign(::
BlockPos const& position,
bool isFrontSide);
604 virtual
void playEmote(::
std::
string const& pieceId,
bool const playChatMessage);
606 virtual
bool isSilentObserver() const ;
608 virtual
void useItem(::
ItemStackBase& instance, ::ItemUseMethod itemUseMethod,
bool consumeItem) ;
610 virtual
bool isLoading() const;
612 virtual
bool isPlayerInitialized() const;
614 virtual
void stopLoading();
616 virtual
float getSpeed() const ;
618 virtual
void setPlayerGameType(::GameType gameType);
620 virtual
void initHUDContainerManager();
622 virtual
void emitCriticalHitParticles(::Actor const& target,
int particleCount);
624 virtual
bool isImmobile() const ;
626 virtual
void sendMotionPacketIfNeeded() ;
630 virtual uint getUserId() const;
632 virtual
void addExperience(
int xp);
634 virtual
void addLevels(
int levels);
636 virtual
void setArmor(::SharedTypes::Legacy::ArmorSlot slot, ::
ItemStack const& item) ;
638 virtual
void setOffhandSlot(::
ItemStack const& item) ;
640 virtual ::
std::unique_ptr<::
Packet> tryCreateAddActorPacket() ;
646 virtual
void slotChanged(
657 virtual
void deleteContainerManager();
659 virtual ::
ItemStack const& getEquippedTotem() const ;
661 virtual
bool consumeTotem() ;
663 virtual
bool isActorRelevant(::Actor const& actor);
665 virtual
float getMapDecorationRotation() const ;
667 virtual
void teleportTo(
669 bool shouldStopRiding,
671 int sourceEntityType,
675 virtual
bool startRiding(::Actor& vehicle,
bool forceRiding) ;
677 virtual
void startSwimming() ;
679 virtual
void stopSwimming() ;
681 virtual
bool isTeacher() const = 0;
683 virtual
void onSuspension();
685 virtual
void onLinkedSlotsChanged();
687 virtual
bool canBePulledIntoVehicle() const ;
689 virtual
void feed(
int itemId) ;
696 virtual
void sendNetworkPacket(::
Packet& packet) const;
698 virtual
bool canExistWhenDisallowMob() const ;
700 virtual ::mce::Color getNameTagTextColor() const ;
702 virtual
bool canAddPassenger(::Actor& passenger) const ;
706 virtual
bool isSimulated() const;
708 virtual ::
std::
string getXuid() const;
712 virtual
bool canFreeze() const ;
714 virtual
bool canInteractWithOtherEntitiesInGame() const ;
716 virtual
bool canObstructSpawningAndBlockPlacement() const ;
718 virtual ::
std::optional<::
BlockPos> getLastDeathPos() const ;
720 virtual ::
std::optional<::DimensionType> getLastDeathDimension() const ;
722 virtual
bool hasDiedBefore() const ;
724 virtual
void doEnterWaterSplashEffect() ;
726 virtual
void doExitWaterSplashEffect() ;
728 virtual ::
std::optional<::
std::
string> const getPartyId_UNTRUSTED() const;
730 virtual
void requestMissingSubChunk(::
SubChunkPos const& scp);
732 virtual uchar getMaxChunkBuildRadius() const;
734 virtual
float causeFallDamageToActor(
float distance,
float multiplier, ::
ActorDamageSource source) ;
736 virtual
void setBehaviorCommandStatus(::
std::
string const& name, ::BehaviorStatus status);
738 virtual
void setRemotePlayerTicked(
bool ticked);
743 _hurt(::
ActorDamageSource const& source,
float damage,
bool knock,
bool ignite) ;
747 virtual
void addAdditionalSaveData(::
CompoundTag& entityTag) const ;
749 virtual
void onMovePlayerPacketNormal(::
Vec3 const& pos, ::
Vec2 const& rot,
float yHeadRot);
751 virtual
bool _shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot, ::
ItemStack const& item) const
754 virtual
bool _shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot, ::
ItemStack const& item) const
763 virtual ::
HashedString const& getActorRendererId() const ;
765 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const = 0;
767 virtual
void destroyEditorPlayer() = 0;
769 virtual
void _serverInitItemStackIds() ;
780 ::GameType playerGameType,
781 bool isHostingPlayer,
785 ::
std::
string const& deviceId,
786 ::PlayerAuthenticationType authType,
789 ::
std::
string const& platformId,
790 ::
std::
string const& platformOnlineId
793 MCAPI
void _addLevels(
int levels);
797 MCAPI
bool _checkAndFixSpawnPosition(
798 ::
Vec3& spawnPosition,
800 bool adjustYToSolidGround,
802 bool positionFromSave
806 MCAPI
void _checkMovementShouldStopEmoting();
809 MCAPI
void _chooseSpawnArea();
811 MCAPI
bool _chooseSpawnPositionWithinArea();
813 MCAPI
void _ensureSafeSpawnPosition(
::Vec3& pos);
815 MCAPI
bool _findFallbackSpawnPosition(
817 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
819 bool checkStoredFallback
822 MCAPI ::std::optional<::BlockPos> _findValidPosWithVerticalSpace(
::BlockPos spawnPosition);
824 MCAPI
void _handleCarriedItemInteractText();
826 MCAPI
bool _isChunkSourceLoaded(
::Vec3 const& spawnPosition,
::BlockSource const& region)
const;
830 MCAPI
void _preSpawnBuildSpawnDataCache();
832 MCAPI
void _registerElytraLoopSound();
834 MCAPI
void _registerPlayerAttributes();
836 MCAPI
void _resetClientAnimations();
840 MCAPI
void _sendShieldUpdatePacket(
844 ::ContainerID container,
848 MCAPI
void _setPlayerGameType(::GameType gameType);
850 MCAPI
void _updateInteraction();
852 MCAPI
bool _validateSpawnPositionAvailability(
855 ::Vec3 const*
const AABBoffset
858 MCAPI ::ActorHurtResult attack(
860 ::SharedTypes::Legacy::ActorDamageCause
const& cause,
864 MCAPI
void broadcastPlayerSpawnedMobEvent(::ActorType spawnedType, ::MobSpawnMethod spawnMethod);
866 MCAPI
bool canBeSeenOnMap()
const;
868 MCAPI
bool canJump();
870 MCAPI
bool canOpenContainerScreen();
872 MCAPI
bool canSleep()
const;
874 MCAPI
bool canStackInOffhand(
::ItemStack const& item)
const;
876 MCAPI
bool canUseAbility(::AbilitiesIndex abilityIndex)
const;
878 MCAPI
bool canUseOperatorBlocks()
const;
880 MCAPI
void causeFoodExhaustion(
float exhaustionAmount);
884 MCAPI
bool checkNeedAutoJump(
float inputMoveX,
float inputMoveZ);
886 MCAPI
bool checkSpawnBlock(
::BlockSource const& region)
const;
888 MCAPI
void completeUsingItem();
892 MCAPI
void eat(
int hungerValue,
float saturationModifier);
894 MCAPI
bool equippedArmorItemCanBeMoved(
::ItemStack const& item)
const;
896 MCAPI
void fireDimensionChangedEvent(::DimensionType fromDimension, ::DimensionType toDimension);
898 MCFOLD ::LayeredAbilities
const& getAbilities()
const;
900 MCFOLD ::LayeredAbilities& getAbilities();
902 MCAPI ::Agent* getAgent()
const;
904 MCAPI ::SharedTypes::Legacy::LevelSoundEvent getAttackHitSound()
const;
906 MCAPI ::SharedTypes::Legacy::LevelSoundEvent getAttackMissSound()
const;
908 MCAPI ::ItemStack
const& getCurrentActiveShield()
const;
910 MCAPI
float getDestroyProgress(
::Block const& block);
912 MCAPI ::DimensionType getExpectedSpawnDimensionId()
const;
914 MCAPI ::BlockPos
const& getExpectedSpawnPosition()
const;
916 MCAPI ::std::string getInteractText()
const;
918 MCAPI
int getItemCooldownLeft(
::HashedString const& category)
const;
920 MCAPI ::std::string getItemInteractText(
::Item const& item)
const;
922 MCAPI
float getLuck();
925 MCAPI
void getNewEnchantmentSeed();
928 MCAPI ::AABB getPickupArea()
const;
930 MCAPI ::GameType getPlayerGameType()
const;
932 MCFOLD ::ItemStack
const& getSelectedItem()
const;
934 MCAPI
float getSleepRotation()
const;
936 MCAPI
int getXpNeededForNextLevel()
const;
939 MCAPI
void handleMovePlayerPacket(
940 ::PlayerPositionModeComponent::PositionMode mode,
951 MCAPI
bool hasRespawnPosition()
const;
953 MCAPI ::InteractionResult interact(::Actor& actor,
::Vec3 const& location);
955 MCAPI
void inventoryChanged(
963 MCAPI
bool is2DPositionRelevant(::DimensionType dimension,
::BlockPos const& position);
966 MCAPI
bool isEmoting()
const;
969 MCAPI
bool isEquipmentHidden()
const;
971 MCAPI
bool isFlying()
const;
973 MCAPI
bool isForcedRespawn()
const;
975 MCAPI
bool isHiddenFrom(::Mob& target)
const;
979 MCAPI
bool isInRaid()
const;
981 MCAPI
bool isItemOnCooldown(
::HashedString const& category)
const;
984 MCAPI
bool isScoping()
const;
989 MCAPI
void playFallOrLandSound(
int expectedDamage,
::Block const& onBlock,
::Block const& blockAbove);
991 MCAPI
void playPredictiveSynchronizedSound(
992 ::SharedTypes::Legacy::LevelSoundEvent type,
998 MCAPI
void recheckSpawnPosition();
1004 MCAPI
void releaseUsingItem();
1006 MCAPI
void resetPlayerLevel();
1012 MCAPI
void setAgent(
::Agent* agent);
1014 MCAPI
void setBedRespawnPosition(
::BlockPos const& bedPosition);
1017 MCAPI
void setChunkRadius(uint chunkRadius);
1020 MCAPI
void setContainerManagerModel(::std::shared_ptr<::ContainerManagerModel> manager);
1022 MCAPI
void setHasDied(
bool hasDied);
1024 MCAPI
void setLastDeathDimension(::DimensionType dimension);
1029 MCAPI
void setLastHurtBy(::ActorType lastHurtBy);
1032 MCAPI
void setName(::std::string
const& newName);
1034 MCAPI
void setPlatformOnlineId(::std::string
const& platformOnlineId);
1036 MCAPI
void setPlayerUIItem(::PlayerUISlot slot,
::ItemStack const& item,
bool forceBalance);
1038 MCAPI
void setRespawnPosition(
::BlockPos const& inRespawnPosition, ::DimensionType dimension);
1040 MCAPI
void setRespawnPositionCandidate();
1042 MCAPI
void setSelectedItem(
::ItemStack const& item);
1044 MCAPI ::ItemStack
const& setSelectedSlot(
int slot);
1046 MCAPI
bool setSpawnBlockRespawnPosition(
::BlockPos const& spawnBlockPosition, ::DimensionType dimension);
1048 MCAPI
void startItemCooldown(
::Item const& item,
bool updateClient);
1050 MCAPI
void startItemCooldown(
::HashedString const& type,
int tickDuration,
bool updateClient);
1055 MCAPI
void startUsingItem(
::ItemStack const& instance,
int duration);
1057 MCAPI
void stopGliding();
1061 MCAPI
void stopUsingItem();
1063 MCAPI
bool take(::Actor& actor,
int,
int favoredSlot);
1065 MCAPI
void tickArmor();
1067 MCAPI
bool tryStartGliding();
1072 MCAPI
bool updateEmoteMessageData(
::PersonaPiece const& emotePiece);
1075 MCAPI
void updateInventoryTransactions();
1079 MCAPI
void updateTrackedBosses();
1081 MCAPI
void useSelectedItem(::ItemUseMethod itemUseMethod,
bool consumeItem);
1090 MCAPI static ::std::optional<::Player::FixedSpawnPositionData> checkAndFixSpawnPosition(
1091 ::Vec3 const& spawnPosition,
1092 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
1094 bool adjustYToSolidGround,
1096 bool positionFromSave,
1097 bool spawningAtForcedSpawn,
1098 short dimensionHeight
1102 MCAPI static ::std::optional<::Player::FixedSpawnPositionData_DEPRECATED> checkAndFixSpawnPosition_DEPRECATED(
1103 ::Vec3 const& spawnPosition,
1104 ::std::vector<::gsl::not_null<::BlockSource*>> regions,
1106 bool adjustYToSolidGround,
1109 bool positionFromSave,
1110 bool spawningAtForcedSpawn,
1111 short dimensionHeight
1114 MCAPI
static bool checkNeedAutoJump(
1118 float movementSpeed,
1125 MCAPI
static bool isDangerousVolumeForSpawn(
::BlockSource& region,
::AABB const& centeredAABB);
1128 MCAPI
static bool isDangerousVolumeForSpawnFromSave(
::BlockSource& region,
::AABB const& centeredAABB);
1132 isDangerousVolume_DEPRECATED(
::BlockSource& region,
::AABB const& centeredAABB,
bool checkForLava);
1135 updatePlayerGameTypeEntityData(
::EntityContext& entity, ::GameType gameType, ::GameType defaultGameType);
1141 MCAPI static ::Attribute
const& EXHAUSTION();
1143 MCAPI static ::Attribute
const& EXPERIENCE();
1145 MCAPI static ::Attribute
const& HUNGER();
1147 MCAPI static ::Attribute
const& LEVEL();
1149 MCAPI static ::Attribute
const& SATURATION();
1158 ::GameType playerGameType,
1159 bool isHostingPlayer,
1161 ::SubClientId subid,
1163 ::std::string
const& deviceId,
1164 ::PlayerAuthenticationType authType,
1167 ::std::string
const& platformId,
1168 ::std::string
const& platformOnlineId
1181 MCAPI
void $initializeComponents(::ActorInitializationMethod method,
::VariantParameterList const& params);
1187 MCAPI
void $destroyRegion();
1189 MCAPI
void $suspendRegion();
1191 MCAPI
void $_fireDimensionChanged();
1193 MCAPI
bool $canChangeDimensionsUsingPortal()
const;
1195 MCFOLD
void $changeDimensionWithCredits(::DimensionType dimension);
1197 MCAPI
void $tickWorld(
::Tick const& currentTick);
1199 MCAPI ::std::vector<::ChunkPos>
const& $getTickingOffsets()
const;
1201 MCAPI
void $normalTick();
1203 MCAPI
void $moveView();
1205 MCAPI
void $moveSpawnView(
::Vec3 const& spawnPosition, ::DimensionType dimensionType);
1207 MCFOLD
void $onSynchedDataUpdate(
int dataId);
1209 MCAPI
void $aiStep();
1211 MCAPI
bool $isFireImmune()
const;
1213 MCFOLD
void $checkMovementStats(
::Vec3 const& d);
1215 MCFOLD ::HashedString $getCurrentStructureFeature()
const;
1217 MCFOLD
bool $isAutoJumpEnabled()
const;
1219 MCAPI ::Vec3 $getInterpolatedRidingOffset(
float,
int const)
const;
1221 MCAPI
void $passengerTick();
1225 MCAPI
void $remove();
1227 MCAPI
void $respawn();
1229 MCAPI
bool $shouldDropDeathLoot()
const;
1233 MCAPI
void $dropEquipmentOnDeath();
1235 MCFOLD
void $clearVanishEnchantedItemsOnDeath();
1237 MCAPI
bool $drop(
::ItemStack const& item,
bool const randomly);
1239 MCFOLD
void $resetRot();
1241 MCAPI
void $resetUserPos(::ActorResetRule resetRule);
1243 MCFOLD
bool $isInTrialMode();
1245 MCAPI
void $setSpeed(
float _speed);
1247 MCAPI
int $getItemUseDuration()
const;
1249 MCAPI
float $getItemUseStartupProgress()
const;
1251 MCAPI
float $getItemUseIntervalProgress()
const;
1253 MCAPI
bool $isBlocking()
const;
1257 MCAPI
void $handleEntityEvent(::ActorEvent
id,
int data);
1259 MCAPI ::std::vector<::ItemStack const*> $getAllHandEquipment()
const;
1261 MCAPI ::std::vector<::ItemStack const*> $getAllEquipment()
const;
1265 MCAPI ::CommandPermissionLevel $getCommandPermissionLevel()
const;
1267 MCAPI ::ActorHurtResult $attack(::Actor& actor, ::SharedTypes::Legacy::ActorDamageCause
const& cause);
1269 MCFOLD ::ItemStack
const& $getCarriedItem()
const;
1271 MCAPI
void $setCarriedItem(
::ItemStack const& item);
1273 MCAPI
void $damageCarriedItemOnAttack(::Actor& target,
float damageDealtToTarget);
1275 MCFOLD
void $openPortfolio();
1277 MCFOLD
void $openBook(
int bookSlot,
bool editable,
int page,
::BlockActor* lectern);
1279 MCFOLD
void $openTrading(
::ActorUniqueID const& uniqueID,
bool useNewScreen);
1283 MCFOLD
void $openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> data);
1285 MCFOLD
void $openInventory();
1287 MCFOLD
void $displayChatMessage(
1288 ::std::string
const& author,
1289 ::std::string
const& message,
1290 ::std::optional<::std::string>
const filteredMessage
1294 $displayClientMessage(::std::string
const& message, ::std::optional<::std::string>
const filteredMessage);
1296 MCFOLD
void $displayTextObjectMessage(
1298 ::std::string
const& fromXuid,
1299 ::std::string
const& fromPlatformId
1302 MCFOLD
void $displayTextObjectWhisperMessage(
1304 ::std::string
const& xuid,
1305 ::std::string
const& platformId
1308 MCFOLD
void $displayTextObjectWhisperMessage(
1309 ::std::string
const& message,
1310 ::std::string
const& xuid,
1311 ::std::string
const& platformId
1314 MCFOLD
void $displayWhisperMessage(
1315 ::std::string
const& author,
1316 ::std::string
const& message,
1317 ::std::optional<::std::string>
const filteredMessage,
1318 ::std::string
const& xuid,
1319 ::std::string
const& platformId
1322 MCAPI
float $getShadowRadius()
const;
1324 MCAPI
bool $isSleeping()
const;
1326 MCAPI
void $setSleeping(
bool val);
1328 MCAPI ::BedSleepingResult $startSleepInBed(
::BlockPos const& bedBlockPos);
1330 MCAPI
void $stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
1332 MCAPI
bool $canStartSleepInBed();
1334 MCFOLD
void $sendInventory(
bool shouldSelectSlot);
1336 MCFOLD
void $openSign(
::BlockPos const& position,
bool isFrontSide);
1338 MCFOLD
void $playEmote(::std::string
const& pieceId,
bool const playChatMessage);
1340 MCAPI
bool $isSilentObserver()
const;
1342 MCAPI
void $useItem(
::ItemStackBase& instance, ::ItemUseMethod itemUseMethod,
bool consumeItem);
1344 MCFOLD
bool $isLoading()
const;
1346 MCFOLD
bool $isPlayerInitialized()
const;
1348 MCFOLD
void $stopLoading();
1350 MCAPI
float $getSpeed()
const;
1352 MCAPI
void $setPlayerGameType(::GameType gameType);
1354 MCAPI
void $initHUDContainerManager();
1356 MCAPI
void $emitCriticalHitParticles(::Actor
const& target,
int particleCount);
1358 MCAPI
bool $isImmobile()
const;
1360 MCFOLD
void $sendMotionPacketIfNeeded();
1362 MCAPI ::IMinecraftEventing* $getEventing()
const;
1364 MCFOLD uint $getUserId()
const;
1366 MCAPI
void $addExperience(
int xp);
1368 MCAPI
void $addLevels(
int levels);
1370 MCAPI
void $setArmor(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item);
1372 MCAPI
void $setOffhandSlot(
::ItemStack const& item);
1374 MCAPI ::std::unique_ptr<::Packet> $tryCreateAddActorPacket();
1378 MCAPI
void $deleteContainerManager();
1380 MCAPI ::ItemStack
const& $getEquippedTotem()
const;
1382 MCAPI
bool $consumeTotem();
1384 MCFOLD
bool $isActorRelevant(::Actor
const& actor);
1386 MCAPI
float $getMapDecorationRotation()
const;
1389 $teleportTo(
::Vec3 const& pos,
bool shouldStopRiding,
int cause,
int sourceEntityType,
bool keepVelocity);
1391 MCAPI
bool $startRiding(::Actor& vehicle,
bool forceRiding);
1393 MCAPI
void $startSwimming();
1395 MCAPI
void $stopSwimming();
1397 MCFOLD
void $onSuspension();
1399 MCFOLD
void $onLinkedSlotsChanged();
1401 MCFOLD
bool $canBePulledIntoVehicle()
const;
1403 MCAPI
void $feed(
int itemId);
1405 MCFOLD
void $sendNetworkPacket(
::Packet& packet)
const;
1407 MCFOLD
bool $canExistWhenDisallowMob()
const;
1409 MCAPI ::mce::Color $getNameTagTextColor()
const;
1411 MCAPI
bool $canAddPassenger(::Actor& passenger)
const;
1413 MCFOLD
bool $isSimulated()
const;
1415 MCAPI ::std::string $getXuid()
const;
1417 MCAPI ::PlayerMovementSettings
const& $getMovementSettings()
const;
1419 MCAPI
bool $canFreeze()
const;
1421 MCAPI
bool $canInteractWithOtherEntitiesInGame()
const;
1423 MCAPI
bool $canObstructSpawningAndBlockPlacement()
const;
1425 MCAPI ::std::optional<::BlockPos> $getLastDeathPos()
const;
1427 MCAPI ::std::optional<::DimensionType> $getLastDeathDimension()
const;
1429 MCAPI
bool $hasDiedBefore()
const;
1431 MCAPI
void $doEnterWaterSplashEffect();
1433 MCAPI
void $doExitWaterSplashEffect();
1435 MCFOLD ::std::optional<::std::string>
const $getPartyId_UNTRUSTED()
const;
1437 MCFOLD
void $requestMissingSubChunk(
::SubChunkPos const& scp);
1439 MCFOLD uchar $getMaxChunkBuildRadius()
const;
1441 MCAPI
float $causeFallDamageToActor(
float distance,
float multiplier,
::ActorDamageSource source);
1443 MCFOLD
void $setBehaviorCommandStatus(::std::string
const& name, ::BehaviorStatus status);
1445 MCFOLD
void $setRemotePlayerTicked(
bool ticked);
1447 MCFOLD ::std::unique_ptr<::ISparseContainerSetListener> $createSparseContainerListener();
1449 MCAPI ::ActorHurtResult $_hurt(
::ActorDamageSource const& source,
float damage,
bool knock,
bool ignite);
1453 MCAPI
void $addAdditionalSaveData(
::CompoundTag& entityTag)
const;
1455 MCAPI
void $onMovePlayerPacketNormal(
::Vec3 const& pos,
::Vec2 const& rot,
float yHeadRot);
1457 MCAPI
bool $_shouldProvideFeedbackOnHandContainerItemSet(::HandSlot handSlot,
::ItemStack const& item)
const;
1459 MCAPI
bool $_shouldProvideFeedbackOnArmorSet(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item)
const;
1461 MCAPI ::std::shared_ptr<::ChunkViewSource> $_createChunkSource(
::ChunkSource& mainChunkSource);
1465 MCAPI ::AnimationComponent& $getAnimationComponent();
1467 MCAPI ::HashedString
const& $getActorRendererId()
const;
1469 MCFOLD
void $_serverInitItemStackIds();
1471 MCAPI ::std::unique_ptr<::BodyControl> $initBodyControl();
1479 MCAPI
static void** $vftable();