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 ;
170 virtual bool swing() ;
174 hurtArmorSlots(
::ActorDamageSource const& source,
int dmg, ::std::bitset<5>
const hurtSlots) ;
177 virtual void sendArmorDamage(::std::bitset<5>
const damagedSlots) ;
180 virtual void sendArmor(::std::bitset<5>
const armorSlots) ;
183 virtual void setDamagedArmor(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item) ;
186 virtual void sendInventory(
bool shouldSelectSlot) ;
192 virtual void sendComplexInventoryTransaction(::std::unique_ptr<::ComplexInventoryTransaction> transaction)
const
196 virtual void sendNetworkPacket(
::Packet& packet)
const ;
199 virtual void displayTextObjectMessage(
201 ::std::string
const& fromXuid,
202 ::std::string
const& fromPlatformId
206 virtual void displayTextObjectWhisperMessage(
208 ::std::string
const& xuid,
209 ::std::string
const& platformId
213 virtual void displayTextObjectWhisperMessage(
214 ::std::string
const& message,
215 ::std::string
const& xuid,
216 ::std::string
const& platformId
220 virtual void displayWhisperMessage(
221 ::std::string
const& author,
222 ::std::string
const& message,
223 ::std::optional<::std::string>
const filteredMessage,
224 ::std::string
const& xuid,
225 ::std::string
const& platformId
229 virtual void openTrading(
::ActorUniqueID const& uniqueID,
bool useNewScreen) ;
232 virtual void openPortfolio() ;
235 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc) ;
238 virtual void openInventory() ;
241 virtual void openBook(
int,
bool,
int,
::BlockActor* lectern) ;
244 virtual void openSign(
::BlockPos const& position,
bool isFrontSide) ;
247 virtual void checkMovementStats(
::Vec3 const& d) ;
250 virtual ::HashedString getCurrentStructureFeature() const ;
253 virtual
void handleEntityEvent(::ActorEvent
id,
int data) ;
259 virtual
void slotChanged(
272 virtual
void stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList) ;
275 virtual
void setArmor(::SharedTypes::Legacy::ArmorSlot const slot, ::
ItemStack const& item) ;
278 virtual
void setOffhandSlot(::
ItemStack const& item) ;
281 virtual
void clearVanishEnchantedItemsOnDeath() ;
284 virtual
bool canChangeDimensionsUsingPortal() const ;
290 virtual
void changeDimensionWithCredits(::
DimensionType dimension) ;
293 virtual
void setPlayerGameType(::GameType gameType) ;
296 virtual
void prepareRegion(::
ChunkSource& mainChunkSource) ;
299 virtual
bool isActorRelevant(::
Actor const& actor) ;
305 virtual
void destroyRegion() ;
308 virtual
void onSuspension() ;
311 virtual
void onLinkedSlotsChanged() ;
314 virtual
bool isTeacher() const ;
317 virtual
bool isLoading() const ;
323 virtual
bool isPlayerInitialized() const ;
326 virtual
void respawn() ;
332 virtual
void destroyEditorPlayer() ;
335 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const ;
338 virtual uchar getMaxChunkBuildRadius() const ;
341 virtual
int _getSpawnChunkLimit() const;
344 virtual
void _updateChunkPublisherView(::
Vec3 const& position,
float minDistance);
347 virtual
void _serverInitItemStackIds() ;
357 ::ClientBlobCache::Server::ActiveTransfersManager& clientCacheMirror,
358 ::GameType playerGameType,
359 bool isHostingPlayer,
364 ::
std::
string const& deviceId,
365 ::PlayerAuthenticationType authType,
368 bool enableItemStackNetManager,
370 ::PlatformType platformType,
371 ::InputMode inputMode,
375 MCAPI
bool _checkForLoadedTickingAreas() const;
377 MCAPI
void _logCDEvent(
378 ::CrashDumpLogStringID option1,
379 ::CrashDumpLogStringID option2,
380 ::CrashDumpLogStringID option3,
381 ::CrashDumpLogStringID option4
384 MCAPI
void _removeNearbyEntities();
388 MCAPI
void _updateNearbyActors();
390 MCAPI
void addActorToReplicationList(::gsl::not_null<::
Actor*> actor,
bool autonomous);
392 MCAPI
void createEditorPlayer(::Bedrock::NonOwnerPointer<::Editor::IEditorManager> editorManager);
394 MCAPI
void disconnect();
396 MCAPI
void doDeleteContainerManager(
bool forceDisconnect);
398 MCAPI
void doInitialSpawn();
400 MCAPI
void handleActorPickRequestOnServer(::
Actor& target,
bool withData,
bool isActorAgentAndEduMode);
402 MCAPI
void handleBlockPickRequestOnServer(::
BlockPos const& position,
bool withData);
404 MCAPI
void hideAllExcept(::
std::optional<::
std::vector<::HudElement>> const& hudElements);
406 MCAPI
bool isInPickRangeOf(::
BlockPos const& pos) const;
408 MCAPI ::ContainerID openUnmanagedContainer();
410 MCAPI
void postReplicationTick(::
Tick const& currentTick);
412 MCAPI
void preReplicationTick(::
Tick const& currentTick);
414 MCAPI
bool selectItem(::
ItemStack const& item);
416 MCAPI
void setClientChunkRadius(uint requestedRadius, uchar clientMaxChunkRadius);
418 MCAPI
void setHudVisibilityState(
419 ::HudVisibility hudVisibility,
420 ::
std::optional<::
std::vector<::HudElement>> const& hudElements
439 ::ClientBlobCache::Server::ActiveTransfersManager& clientCacheMirror,
440 ::GameType playerGameType,
441 bool isHostingPlayer,
446 ::
std::
string const& deviceId,
447 ::PlayerAuthenticationType authType,
450 bool enableItemStackNetManager,
452 ::PlatformType platformType,
453 ::InputMode inputMode,
467 MCAPI
void $initializeComponents(::ActorInitializationMethod method, ::
VariantParameterList const& params);
469 MCAPI
void $aiStep();
471 MCAPI
void $normalTick();
473 MCAPI
void $knockback(
478 float horizontalPower,
485 MCAPI
void $moveView();
487 MCAPI
void $moveSpawnView(::
Vec3 const& spawnPosition, ::
DimensionType dimensionType);
491 MCAPI
bool $isValidTarget(::
Actor* attacker) const;
495 MCAPI
void $hurtArmorSlots(::
ActorDamageSource const& source,
int dmg, ::
std::bitset<5> const hurtSlots);
497 MCAPI
void $sendArmorDamage(::
std::bitset<5> const damagedSlots);
499 MCAPI
void $sendArmor(::
std::bitset<5> const armorSlots);
501 MCAPI
void $sendInventory(
bool shouldSelectSlot);
507 MCAPI
void $sendNetworkPacket(::
Packet& packet) const;
509 MCAPI
void $displayTextObjectMessage(
511 ::
std::
string const& fromXuid,
512 ::
std::
string const& fromPlatformId
515 MCAPI
void $displayTextObjectWhisperMessage(
517 ::
std::
string const& xuid,
518 ::
std::
string const& platformId
521 MCAPI
void $displayTextObjectWhisperMessage(
522 ::
std::
string const& message,
523 ::
std::
string const& xuid,
524 ::
std::
string const& platformId
527 MCAPI
void $displayWhisperMessage(
528 ::
std::
string const& author,
529 ::
std::
string const& message,
530 ::
std::optional<::
std::
string> const filteredMessage,
531 ::
std::
string const& xuid,
532 ::
std::
string const& platformId
535 MCAPI
void $openTrading(::
ActorUniqueID const& uniqueID,
bool useNewScreen);
537 MCFOLD
void $openPortfolio();
541 MCAPI
void $openInventory();
543 MCAPI
void $openBook(
int,
bool,
int, ::
BlockActor* lectern);
545 MCAPI
void $openSign(::
BlockPos const& position,
bool isFrontSide);
547 MCAPI
void $checkMovementStats(::
Vec3 const& d);
549 MCAPI ::
HashedString $getCurrentStructureFeature() const;
551 MCAPI
void $handleEntityEvent(::ActorEvent
id,
int data);
555 MCAPI
void $slotChanged(
566 MCAPI
void $stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
568 MCAPI
void $setOffhandSlot(::
ItemStack const& item);
570 MCAPI
void $clearVanishEnchantedItemsOnDeath();
572 MCAPI
bool $canChangeDimensionsUsingPortal() const;
576 MCAPI
void $changeDimensionWithCredits(::
DimensionType dimension);
578 MCAPI
void $setPlayerGameType(::GameType gameType);
580 MCAPI
void $prepareRegion(::
ChunkSource& mainChunkSource);
582 MCAPI
bool $isActorRelevant(::
Actor const& actor);
586 MCAPI
void $destroyRegion();
588 MCAPI
void $onSuspension();
590 MCAPI
void $onLinkedSlotsChanged();
592 MCAPI
bool $isTeacher() const;
594 MCAPI
bool $isLoading() const;
598 MCAPI
bool $isPlayerInitialized() const;
600 MCAPI
void $respawn();
604 MCAPI
void $destroyEditorPlayer();
606 MCAPI ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> $getEditorPlayer() const;
608 MCAPI uchar $getMaxChunkBuildRadius() const;
610 MCAPI
int $_getSpawnChunkLimit() const;
612 MCAPI
void $_updateChunkPublisherView(::
Vec3 const& position,
float minDistance);
614 MCAPI
void $_serverInitItemStackIds();