68class ServerPlayer :
public ::Player {
79 enum class State :
int {
89 ::ll::TypedStorage<1, 1, bool> isAutonomous;
90 ::ll::TypedStorage<4, 4, ::ServerPlayer::NearbyActor::State> state;
91 ::ll::TypedStorage<8, 8, ::Actor*> tempActor;
95 using OnPlayerLoadedCallback = ::std::function<void(::ServerPlayer&)>;
98 LLNDAPI
static ServerPlayer* tryGetFromEntity(
::EntityContext& entity,
bool includeRemoved);
103 ::ll::TypedStorage<4, 4, ::PlatformType> mPlatformType;
104 ::ll::TypedStorage<8, 8, ::ServerNetworkSystem&> mNetwork;
105 ::ll::TypedStorage<8, 64, ::std::function<void(::ServerPlayer&)>> mOnPlayerLoadedCallback;
106 ::ll::TypedStorage<8, 112, ::InventoryMenu> mInventoryMenu;
107 ::ll::TypedStorage<1, 1, ::ContainerID> mContainerCounter;
108 ::ll::TypedStorage<4, 4, uint> mMaxChunkRadius;
109 ::ll::TypedStorage<1, 1, bool> mIsInitialPlayerLoadHappening;
110 ::ll::TypedStorage<1, 1, bool> mIsTeacher;
111 ::ll::TypedStorage<1, 1, bool> mLocalPlayerInitialized;
112 ::ll::TypedStorage<1, 1, bool> mWaitingForTickingAreasPreload;
113 ::ll::TypedStorage<8, 8, ::Tick> mPrevShieldBlockingTick;
114 ::ll::TypedStorage<4, 4, uint> mClientViewRadius;
115 ::ll::TypedStorage<4, 4, uint> mClientRequestedRadius;
116 ::ll::TypedStorage<1, 1, bool> mIsCompatibleWithClientSideChunkGen;
117 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mPartyId;
118 ::ll::TypedStorage<4, 4, int> mRemainingStructureRefreshTicks;
119 ::ll::TypedStorage<8, 48, ::HashedString> mCurrentStructureFeature;
120 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ActorUniqueID, ::ServerPlayer::NearbyActor>> mNearbyActors;
121 ::ll::TypedStorage<8, 16, ::CallbackToken> mCloseContainerToken;
122 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Editor::IEditorPlayer>> mEditorServerPlayer;
123 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Bedrock::DDUI::DataStoreSyncServer>> mDataStoreSync;
124 ::ll::TypedStorage<1, 1, bool> mHasQueuedViewMove;
125 ::ll::TypedStorage<1, 1, bool> mIsPendingDisconnect;
126 ::ll::TypedStorage<4, 52, ::std::array<::HudVisibility, 13>> mHudElementsVisibilityState;
127 ::ll::TypedStorage<8, 24, ::ServerLocatorBar> mServerLocatorBar;
128 ::ll::TypedStorage<8, 24, ::VanillaWaypointManager> mVanillaWaypointManager;
133 ServerPlayer& operator=(ServerPlayer
const&);
134 ServerPlayer(ServerPlayer
const&);
140 virtual ~ServerPlayer() ;
145 virtual void aiStep() ;
147 virtual void normalTick() ;
149 virtual void knockback(
154 float horizontalPower,
161 virtual void moveView() ;
163 virtual void moveSpawnView(
::Vec3 const& spawnPosition, ::DimensionType dimension) ;
167 virtual bool isValidTarget(::Actor* attacker)
const ;
169 virtual bool swing(::ActorSwingSource swingSource) ;
172 hurtArmorSlots(
::ActorDamageSource const& source,
int dmg, ::std::bitset<5>
const hurtSlots) ;
174 virtual void sendArmorDamage(::std::bitset<5>
const damagedSlots) ;
176 virtual void sendArmor(::std::bitset<5>
const armorSlots) ;
178 virtual void setDamagedArmor(::SharedTypes::Legacy::ArmorSlot slot,
::ItemStack const& item) ;
180 virtual void sendInventory(
bool shouldSelectSlot) ;
184 virtual void sendComplexInventoryTransaction(::std::unique_ptr<::ComplexInventoryTransaction> transaction)
const
187 virtual void sendNetworkPacket(
::Packet& packet)
const ;
189 virtual void displayTextObjectMessage(
191 ::std::string
const& fromXuid,
192 ::std::string
const& fromPlatformId
195 virtual void displayTextObjectWhisperMessage(
197 ::std::string
const& xuid,
198 ::std::string
const& platformId
201 virtual void displayTextObjectWhisperMessage(
202 ::std::string
const& message,
203 ::std::string
const& xuid,
204 ::std::string
const& platformId
207 virtual void displayWhisperMessage(
208 ::std::string
const& author,
209 ::std::string
const& message,
210 ::std::optional<::std::string>
const filteredMessage,
211 ::std::string
const& xuid,
212 ::std::string
const& platformId
215 virtual void openTrading(
::ActorUniqueID const& uniqueID,
bool useNewScreen) ;
217 virtual void openPortfolio() ;
219 virtual void openNpcInteractScreen(::std::shared_ptr<::INpcDialogueData> npc) ;
221 virtual void openInventory() ;
223 virtual void openBook(
int,
bool,
int,
::BlockActor* lectern) ;
225 virtual void openSign(
::BlockPos const& position,
bool isFrontSide) ;
227 virtual void checkMovementStats(
::Vec3 const& d) ;
229 virtual ::HashedString getCurrentStructureFeature() const ;
231 virtual
void handleEntityEvent(::ActorEvent
id,
int data) ;
235 virtual
void slotChanged(
246 virtual
void stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList) ;
248 virtual
void setArmor(::SharedTypes::Legacy::ArmorSlot const armorSlot, ::
ItemStack const& item) ;
250 virtual
void setOffhandSlot(::
ItemStack const& item) ;
252 virtual
void clearVanishEnchantedItemsOnDeath() ;
254 virtual
bool canChangeDimensionsUsingPortal() const ;
256 virtual
void changeDimension(::DimensionType toId) ;
258 virtual
void changeDimensionWithCredits(::DimensionType dimension) ;
260 virtual
void setPlayerGameType(::GameType gameType) ;
262 virtual
void prepareRegion(::
ChunkSource& mainChunkSource) ;
264 virtual
bool isActorRelevant(::Actor const& actor) ;
268 virtual
void destroyRegion() ;
270 virtual
void onSuspension() ;
272 virtual
void onLinkedSlotsChanged() ;
274 virtual
bool isTeacher() const ;
276 virtual
bool isLoading() const ;
280 virtual
bool isPlayerInitialized() const ;
282 virtual
void respawn() ;
286 virtual
void destroyEditorPlayer() ;
288 virtual ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> getEditorPlayer() const ;
290 virtual uchar getMaxChunkBuildRadius() const ;
292 virtual ::
std::optional<::
std::
string> const getPartyId_UNTRUSTED() const ;
294 virtual
int _getSpawnChunkLimit() const;
296 virtual
void _updateChunkPublisherView(::
Vec3 const& position,
float minDistance);
298 virtual
void _serverInitItemStackIds() ;
308 ::ClientBlobCache::Server::ActiveTransfersManager& clientCacheMirror,
309 ::GameType playerGameType,
310 bool isHostingPlayer,
313 ::
std::function<
void(::ServerPlayer&)> onPlayerLoadedCallback,
315 ::
std::
string const& deviceId,
316 ::PlayerAuthenticationType authType,
319 bool enableItemStackNetManager,
321 ::PlatformType platformType,
322 ::InputMode inputMode,
326 MCAPI
bool _checkForLoadedTickingAreas() const;
328 MCAPI
void _logCDEvent(
329 ::CrashDumpLogStringID option1,
330 ::CrashDumpLogStringID option2,
331 ::CrashDumpLogStringID option3,
332 ::CrashDumpLogStringID option4
335 MCAPI
void _removeNearbyEntities();
339 MCAPI
void _updateNearbyActors();
341 MCAPI
void createEditorPlayer(::Bedrock::NonOwnerPointer<::Editor::IEditorManager> editorManager);
343 MCAPI
void disconnect();
345 MCAPI
void doDeleteContainerManager(
bool forceDisconnect);
347 MCAPI
void doInitialSpawn();
349 MCAPI
void handleActorPickRequestOnServer(::Actor& target,
bool withData,
bool isActorAgentAndEduMode);
351 MCAPI
void handleBlockPickRequestOnServer(::
BlockPos const& position,
bool withData);
353 MCAPI
void hideAllExcept(::
std::optional<::
std::vector<::HudElement>> const& hudElements);
355 MCAPI
void initiateContainerClose();
357 MCAPI
bool isInPickRangeOf(::
BlockPos const& pos) const;
359 MCAPI ::ContainerID openUnmanagedContainer();
361 MCAPI
void postReplicationTick(::
Tick const& currentTick);
363 MCAPI
void preReplicationTick(::
Tick const& currentTick);
365 MCAPI
bool selectItem(::
ItemStack const& item);
367 MCAPI
void setClientChunkRadius(uint requestedRadius, uchar clientMaxChunkRadius);
369 MCAPI
void setHudVisibilityState(
370 ::HudVisibility hudVisibility,
371 ::
std::optional<::
std::vector<::HudElement>> const& hudElements
374 MCAPI
void setIsShowingCredits(
bool value);
376 MCAPI
void setPartyId(::
std::optional<::
std::
string> partyId);
386 ::ClientBlobCache::Server::ActiveTransfersManager& clientCacheMirror,
387 ::GameType playerGameType,
388 bool isHostingPlayer,
391 ::
std::function<
void(::ServerPlayer&)> onPlayerLoadedCallback,
393 ::
std::
string const& deviceId,
394 ::PlayerAuthenticationType authType,
397 bool enableItemStackNetManager,
399 ::PlatformType platformType,
400 ::InputMode inputMode,
414 MCAPI
void $initializeComponents(::ActorInitializationMethod method, ::
VariantParameterList const& params);
416 MCAPI
void $aiStep();
418 MCAPI
void $normalTick();
420 MCAPI
void $knockback(
425 float horizontalPower,
432 MCAPI
void $moveView();
434 MCAPI
void $moveSpawnView(::
Vec3 const& spawnPosition, ::DimensionType dimension);
438 MCAPI
bool $isValidTarget(::Actor* attacker) const;
440 MCAPI
bool $swing(::ActorSwingSource swingSource);
442 MCAPI
void $hurtArmorSlots(::
ActorDamageSource const& source,
int dmg, ::
std::bitset<5> const hurtSlots);
444 MCAPI
void $sendArmorDamage(::
std::bitset<5> const damagedSlots);
446 MCAPI
void $sendArmor(::
std::bitset<5> const armorSlots);
448 MCAPI
void $setDamagedArmor(::SharedTypes::Legacy::ArmorSlot slot, ::
ItemStack const& item);
450 MCAPI
void $sendInventory(
bool shouldSelectSlot);
456 MCAPI
void $sendNetworkPacket(::
Packet& packet) const;
458 MCAPI
void $displayTextObjectMessage(
460 ::
std::
string const& fromXuid,
461 ::
std::
string const& fromPlatformId
464 MCAPI
void $displayTextObjectWhisperMessage(
466 ::
std::
string const& xuid,
467 ::
std::
string const& platformId
470 MCAPI
void $displayTextObjectWhisperMessage(
471 ::
std::
string const& message,
472 ::
std::
string const& xuid,
473 ::
std::
string const& platformId
476 MCAPI
void $displayWhisperMessage(
477 ::
std::
string const& author,
478 ::
std::
string const& message,
479 ::
std::optional<::
std::
string> const filteredMessage,
480 ::
std::
string const& xuid,
481 ::
std::
string const& platformId
484 MCAPI
void $openTrading(::
ActorUniqueID const& uniqueID,
bool useNewScreen);
486 MCFOLD
void $openPortfolio();
490 MCAPI
void $openInventory();
492 MCAPI
void $openBook(
int,
bool,
int, ::
BlockActor* lectern);
494 MCAPI
void $openSign(::
BlockPos const& position,
bool isFrontSide);
496 MCAPI
void $checkMovementStats(::
Vec3 const& d);
498 MCAPI ::
HashedString $getCurrentStructureFeature() const;
500 MCAPI
void $handleEntityEvent(::ActorEvent
id,
int data);
504 MCAPI
void $slotChanged(
515 MCAPI
void $stopSleepInBed(
bool forcefulWakeUp,
bool updateLevelList);
517 MCAPI
void $setArmor(::SharedTypes::Legacy::ArmorSlot const armorSlot, ::
ItemStack const& item);
519 MCAPI
void $setOffhandSlot(::
ItemStack const& item);
521 MCAPI
void $clearVanishEnchantedItemsOnDeath();
523 MCAPI
bool $canChangeDimensionsUsingPortal() const;
525 MCAPI
void $changeDimension(::DimensionType toId);
527 MCAPI
void $changeDimensionWithCredits(::DimensionType dimension);
529 MCAPI
void $setPlayerGameType(::GameType gameType);
531 MCAPI
void $prepareRegion(::
ChunkSource& mainChunkSource);
533 MCAPI
bool $isActorRelevant(::Actor const& actor);
537 MCAPI
void $destroyRegion();
539 MCAPI
void $onSuspension();
541 MCAPI
void $onLinkedSlotsChanged();
543 MCAPI
bool $isTeacher() const;
545 MCAPI
bool $isLoading() const;
549 MCAPI
bool $isPlayerInitialized() const;
551 MCAPI
void $respawn();
555 MCAPI
void $destroyEditorPlayer();
557 MCAPI ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> $getEditorPlayer() const;
559 MCAPI uchar $getMaxChunkBuildRadius() const;
561 MCAPI ::
std::optional<::
std::
string> const $getPartyId_UNTRUSTED() const;
563 MCAPI
int $_getSpawnChunkLimit() const;
565 MCAPI
void $_updateChunkPublisherView(::
Vec3 const& position,
float minDistance);
567 MCAPI
void $_serverInitItemStackIds();
575 MCAPI static
void** $vftable();