73 using OnPlayerLoadedCallback = ::std::function<void(
::ServerPlayer&)>;
78 enum class State :
int {
88 ::ll::TypedStorage<1, 1, bool> isAutonomous;
89 ::ll::TypedStorage<4, 4, ::ServerPlayer::NearbyActor::State> state;
90 ::ll::TypedStorage<8, 8, ::Actor*> tempActor;
97 ::ll::TypedStorage<4, 4, ::PlatformType> mPlatformType;
98 ::ll::TypedStorage<8, 8, ::ServerNetworkSystem&> mNetwork;
99 ::ll::TypedStorage<8, 64, ::std::function<void(
::ServerPlayer&)>> mOnPlayerLoadedCallback;
100 ::ll::TypedStorage<8, 112, ::InventoryMenu> mInventoryMenu;
101 ::ll::TypedStorage<1, 1, ::ContainerID> mContainerCounter;
102 ::ll::TypedStorage<4, 4, uint> mMaxChunkRadius;
103 ::ll::TypedStorage<1, 1, bool> mIsInitialPlayerLoadHappening;
104 ::ll::TypedStorage<1, 1, bool> mIsTeacher;
105 ::ll::TypedStorage<1, 1, bool> mLocalPlayerInitialized;
106 ::ll::TypedStorage<1, 1, bool> mWaitingForTickingAreasPreload;
107 ::ll::TypedStorage<8, 8, ::Tick> mPrevShieldBlockingTick;
108 ::ll::TypedStorage<4, 4, uint> mClientViewRadius;
109 ::ll::TypedStorage<4, 4, uint> mClientRequestedRadius;
110 ::ll::TypedStorage<1, 1, bool> mIsCompatibleWithClientSideChunkGen;
111 ::ll::TypedStorage<4, 4, int> mRemainingStructureRefreshTicks;
112 ::ll::TypedStorage<8, 48, ::HashedString> mCurrentStructureFeature;
113 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ActorUniqueID, ::ServerPlayer::NearbyActor>> mNearbyActors;
114 ::ll::TypedStorage<8, 16, ::CallbackToken> mCloseContainerToken;
115 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Editor::IEditorPlayer>> mEditorServerPlayer;
116 ::ll::TypedStorage<1, 1, bool> mHasQueuedViewMove;
117 ::ll::TypedStorage<1, 1, bool> mIsPendingDisconnect;
118 ::ll::TypedStorage<4, 52, ::std::array<::HudVisibility, 13>> mHudElementsVisibilityState;
138 virtual void aiStep() ;
141 virtual void normalTick() ;
144 virtual void knockback(
149 float horizontalPower,
158 virtual void moveView() ;
167 virtual bool isValidTarget(
::Actor* attacker)
const ;
171 hurtArmorSlots(
::ActorDamageSource const& source,
int dmg, ::std::bitset<5>
const hurtSlots) ;
174 virtual void sendArmorDamage(::std::bitset<5>
const damagedSlots) ;
177 virtual void sendArmor(::std::bitset<5>
const armorSlots) ;
180 virtual void setDamagedArmor(::SharedTypes::Legacy::ArmorSlot,
::ItemStack const&) ;
183 virtual void sendInventory(
bool shouldSelectSlot) ;
189 virtual void sendComplexInventoryTransaction(::std::unique_ptr<::ComplexInventoryTransaction> transaction)
const
193 virtual void sendNetworkPacket(
::Packet& packet)
const ;
196 virtual void displayTextObjectMessage(
198 ::std::string
const& fromXuid,
199 ::std::string
const& fromPlatformId
203 virtual void displayTextObjectWhisperMessage(
205 ::std::string
const& xuid,
206 ::std::string
const& platformId
210 virtual void displayTextObjectWhisperMessage(
211 ::std::string
const& message,
212 ::std::string
const& xuid,
213 ::std::string
const& platformId
217 virtual void displayWhisperMessage(
218 ::std::string
const& author,
219 ::std::string
const& message,
220 ::std::optional<::std::string>
const filteredMessage,
221 ::std::string
const& xuid,
222 ::std::string
const& platformId
226 virtual void openTrading(
::ActorUniqueID const& uniqueID,
bool useNewScreen) ;
229 virtual void openPortfolio() ;
232 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc) ;
235 virtual void openInventory() ;
238 virtual void openBook(
int,
bool,
int,
::BlockActor* lectern) ;
241 virtual void openSign(
::BlockPos const& position,
bool isFrontSide) ;
244 virtual void checkMovementStats(
::Vec3 const& d) ;
247 virtual ::HashedString getCurrentStructureFeature() const ;
250 virtual
void handleEntityEvent(::ActorEvent eventId,
int data) ;
256 virtual
void slotChanged(
269 virtual
void stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList) ;
272 virtual
void setArmor(::SharedTypes::Legacy::ArmorSlot const slot, ::
ItemStack const& item) ;
275 virtual
void setOffhandSlot(::
ItemStack const& item) ;
278 virtual
void clearVanishEnchantedItemsOnDeath() ;
281 virtual
bool canChangeDimensionsUsingPortal() const ;
287 virtual
void changeDimensionWithCredits(::
DimensionType dimension) ;
290 virtual
void setPlayerGameType(::GameType gameType) ;
293 virtual
void prepareRegion(::
ChunkSource& mainChunkSource) ;
296 virtual
bool isActorRelevant(::
Actor const& actor) ;
302 virtual
void destroyRegion() ;
305 virtual
void onSuspension() ;
308 virtual
void onLinkedSlotsChanged() ;
311 virtual
bool isTeacher() const ;
314 virtual
bool isLoading() const ;
320 virtual
bool isPlayerInitialized() const ;
323 virtual
void respawn() ;
329 virtual
void destroyEditorPlayer() ;
332 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const ;
335 virtual uchar getMaxChunkBuildRadius() const ;
338 virtual
int _getSpawnChunkLimit() const;
341 virtual
void _updateChunkPublisherView(::
Vec3 const& position,
float minDistance);
344 virtual
void _serverInitItemStackIds() ;
354 ::ClientBlobCache::Server::ActiveTransfersManager& clientCacheMirror,
355 ::GameType playerGameType,
356 bool isHostingPlayer,
361 ::
std::
string const& playFabId,
362 ::
std::
string const& deviceId,
363 ::PlayerAuthenticationType authType,
366 bool enableItemStackNetManager,
368 ::PlatformType platformType,
369 ::InputMode inputMode,
373 MCAPI
bool _checkForLoadedTickingAreas() const;
375 MCAPI
void _logCDEvent(
376 ::CrashDumpLogStringID option1,
377 ::CrashDumpLogStringID option2,
378 ::CrashDumpLogStringID option3,
379 ::CrashDumpLogStringID option4
382 MCAPI
void _removeNearbyEntities();
386 MCAPI
void _updateNearbyActors();
388 MCAPI
void addActorToReplicationList(::gsl::not_null<::
Actor*> actor,
bool autonomous);
390 MCAPI
void createEditorPlayer(::Bedrock::NonOwnerPointer<::Editor::IEditorManager> editorManager);
392 MCAPI
void disconnect();
394 MCAPI
void doDeleteContainerManager(
bool forceDisconnect);
396 MCAPI
void doInitialSpawn();
398 MCAPI
void handleActorPickRequestOnServer(::
Actor& target,
bool withData,
bool isActorAgentAndEduMode);
400 MCAPI
void handleBlockPickRequestOnServer(::
BlockPos const& position,
bool withData);
402 MCAPI
void hideAllExcept(::
std::optional<::
std::vector<::HudElement>> const& hudElements);
404 MCAPI
bool isInPickRangeOf(::
BlockPos const& pos) const;
406 MCAPI ::ContainerID openUnmanagedContainer();
408 MCAPI
void postReplicationTick(::
Tick const& currentTick);
410 MCAPI
void preReplicationTick(::
Tick const& currentTick);
412 MCAPI
bool selectItem(::
ItemStack const& item);
414 MCAPI
void setClientChunkRadius(uint requestedRadius, uchar clientMaxChunkRadius);
416 MCAPI
void setHudVisibilityState(
417 ::HudVisibility hudVisibility,
418 ::
std::optional<::
std::vector<::HudElement>> const& hudElements
437 ::ClientBlobCache::Server::ActiveTransfersManager& clientCacheMirror,
438 ::GameType playerGameType,
439 bool isHostingPlayer,
444 ::
std::
string const& playFabId,
445 ::
std::
string const& deviceId,
446 ::PlayerAuthenticationType authType,
449 bool enableItemStackNetManager,
451 ::PlatformType platformType,
452 ::InputMode inputMode,
466 MCAPI
void $initializeComponents(::ActorInitializationMethod method, ::
VariantParameterList const& params);
468 MCAPI
void $aiStep();
470 MCAPI
void $normalTick();
472 MCAPI
void $knockback(
477 float horizontalPower,
484 MCAPI
void $moveView();
486 MCAPI
void $moveSpawnView(::
Vec3 const& spawnPosition, ::
DimensionType dimensionType);
490 MCAPI
bool $isValidTarget(::
Actor* attacker) const;
492 MCAPI
void $hurtArmorSlots(::
ActorDamageSource const& source,
int dmg, ::
std::bitset<5> const hurtSlots);
494 MCAPI
void $sendArmorDamage(::
std::bitset<5> const damagedSlots);
496 MCAPI
void $sendArmor(::
std::bitset<5> const armorSlots);
498 MCAPI
void $sendInventory(
bool shouldSelectSlot);
504 MCAPI
void $sendNetworkPacket(::
Packet& packet) const;
506 MCAPI
void $displayTextObjectMessage(
508 ::
std::
string const& fromXuid,
509 ::
std::
string const& fromPlatformId
512 MCAPI
void $displayTextObjectWhisperMessage(
514 ::
std::
string const& xuid,
515 ::
std::
string const& platformId
518 MCAPI
void $displayTextObjectWhisperMessage(
519 ::
std::
string const& message,
520 ::
std::
string const& xuid,
521 ::
std::
string const& platformId
524 MCAPI
void $displayWhisperMessage(
525 ::
std::
string const& author,
526 ::
std::
string const& message,
527 ::
std::optional<::
std::
string> const filteredMessage,
528 ::
std::
string const& xuid,
529 ::
std::
string const& platformId
532 MCAPI
void $openTrading(::
ActorUniqueID const& uniqueID,
bool useNewScreen);
534 MCFOLD
void $openPortfolio();
538 MCAPI
void $openInventory();
540 MCAPI
void $openBook(
int,
bool,
int, ::
BlockActor* lectern);
542 MCAPI
void $openSign(::
BlockPos const& position,
bool isFrontSide);
544 MCAPI
void $checkMovementStats(::
Vec3 const& d);
546 MCAPI ::
HashedString $getCurrentStructureFeature() const;
548 MCAPI
void $handleEntityEvent(::ActorEvent eventId,
int data);
552 MCAPI
void $slotChanged(
563 MCAPI
void $stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
565 MCAPI
void $setOffhandSlot(::
ItemStack const& item);
567 MCAPI
void $clearVanishEnchantedItemsOnDeath();
569 MCAPI
bool $canChangeDimensionsUsingPortal() const;
573 MCAPI
void $changeDimensionWithCredits(::
DimensionType dimension);
575 MCAPI
void $setPlayerGameType(::GameType gameType);
577 MCAPI
void $prepareRegion(::
ChunkSource& mainChunkSource);
579 MCAPI
bool $isActorRelevant(::
Actor const& actor);
583 MCAPI
void $destroyRegion();
585 MCAPI
void $onSuspension();
587 MCAPI
void $onLinkedSlotsChanged();
589 MCAPI
bool $isTeacher() const;
591 MCAPI
bool $isLoading() const;
595 MCAPI
bool $isPlayerInitialized() const;
597 MCAPI
void $respawn();
601 MCAPI
void $destroyEditorPlayer();
603 MCAPI ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> $getEditorPlayer() const;
605 MCAPI uchar $getMaxChunkBuildRadius() const;
607 MCAPI
int $_getSpawnChunkLimit() const;
609 MCAPI
void $_updateChunkPublisherView(::
Vec3 const& position,
float minDistance);
611 MCAPI
void $_serverInitItemStackIds();