LeviLamina
Loading...
Searching...
No Matches
ServerInstance Class Reference
Inheritance diagram for ServerInstance:

Classes

struct  CreateServerLevelOps
struct  HostMultiplayerOps
struct  NetworkToggleOptions

Public Types

enum class  InstanceState : int {
  Running = 0 , Suspended = 1 , WaitingLeaveGame = 2 , Stopped = 3 ,
  NotStarted = 4
}

Public Member Functions

virtual void onLowMemory (::LowMemorySeverity)
virtual void onLevelCorrupt ()
virtual void onGameModeChanged ()
virtual void onTick (int nTick, int maxTick)
virtual void onInternetUpdate ()
virtual void onGameSessionReset ()
virtual void onLevelExit ()
virtual void onRequestResourceReload ()
virtual void onLowDiskSpace (bool const bSet)
virtual void onOutOfDiskSpace (bool const bSet)
virtual void onCriticalDiskError (bool const bSet, ::Core::LevelStorageState const &errorCode)
virtual void onAppSuspended ()
virtual void onAppResumed ()
virtual void updateScreens ()
MCAPI ServerInstance (::ServerInstanceArguments &&args)
MCAPI_C void _finishLoadingLinkedAssets (::ResourcePackManager &rpm)
MCAPI void _resetServerScriptManager ()
MCAPI void _shutdownStorage (::Bedrock::UniqueOwnerPointer<::LevelStorage > &storage)
MCAPI void _update ()
MCAPI bool _useClientSideChunkGeneration (::LevelData *levelData) const
MCAPI void disconnectAllClients (::Connection::DisconnectFailReason reason)
MCAPI ::Bedrock::NonOwnerPointer<::Editor::IEditorManagergetEditorManager () const
MCAPI::ItemRegistryRef getServerItemRegistry () const
MCAPI bool initializeServer (::ServerInstanceInitArguments &&args)
MCAPI_S void leaveGameSync ()
MCAPI void onCriticalScriptError (::Connection::DisconnectFailReason clientReason, char const *logMessage)
MCAPI void queueForServerThread (::std::function< void()> command)
MCAPI_S void setScriptWatchdogCriticalErrorCallback (::std::function< void(char const *)> criticalErrorCallback)
MCAPI_S void setUnrecoverableErrorCallback (::std::function< void(::Connection::DisconnectFailReason, char const *)> unrecoverableErrorCallback)
MCAPI_C void startLeaveGame ()
MCAPI_S void startServerThread ()
MCAPI void * $ctor (::ServerInstanceArguments &&args)
MCAPI void $dtor ()
MCAPI void $onLevelCorrupt ()
MCFOLD void $onGameModeChanged ()
MCFOLD void $onTick (int nTick, int maxTick)
MCFOLD void $onInternetUpdate ()
MCFOLD void $onGameSessionReset ()
MCFOLD void $onLevelExit ()
MCAPI void $onRequestResourceReload ()
MCAPI void $onLowDiskSpace (bool const bSet)
MCAPI void $onOutOfDiskSpace (bool const bSet)
MCAPI void $onCriticalDiskError (bool const bSet, ::Core::LevelStorageState const &errorCode)
MCAPI void $onAppSuspended ()
MCAPI void $onAppResumed ()
MCFOLD void $updateScreens ()
MCFOLD void * $ctor ()
MCFOLD void * $ctor (::Bedrock::EnableNonOwnerReferences const &)
virtual void onAppPaused ()
virtual void onAppUnpaused ()
virtual void onAppPreSuspended ()
virtual void onAppFocusLost ()
virtual void onAppFocusGained ()
virtual void onAppTerminated ()
virtual void onOperationModeChanged (::OperationMode const operationMode)
virtual void onPerformanceModeChanged (bool const boost)
virtual void onPushNotificationReceived (::PushNotificationMessage const &msg)
virtual void onResizeBegin ()
virtual void onResizeEnd ()
virtual void onDeviceLost ()
virtual void onAppSurfaceCreated ()
virtual void onAppSurfaceDestroyed ()
virtual void onClipboardCopy (::std::string const &)
virtual void onClipboardPaste (::std::string const &)
MCAPI void initListener (float priority)
MCAPI void $onAppPaused ()
MCAPI void $onAppUnpaused ()
MCAPI void $onAppPreSuspended ()
MCAPI void $onAppFocusLost ()
MCAPI void $onAppFocusGained ()
MCAPI void $onAppTerminated ()
MCAPI void $onPerformanceModeChanged (bool const boost)
MCAPI void $onPushNotificationReceived (::PushNotificationMessage const &msg)
MCAPI void $onResizeBegin ()
MCAPI void $onResizeEnd ()
MCAPI void $onDeviceLost ()
MCAPI void $onAppSurfaceCreated ()
MCAPI void $onAppSurfaceDestroyed ()
MCAPI void $onClipboardCopy (::std::string const &)
MCAPI void $onClipboardPaste (::std::string const &)
virtual void onBeforeSimTick ()
MCFOLD void $onBeforeSimTick ()
virtual void onExtendDiskSpace (bool const bSet, ::std::weak_ptr<::Core::FileStorageArea > const &fileStorageAreaWeakPtr, uint64 freeSpace, ::std::function< void()> onHandledEventCallback)
MCAPI void initListener (::std::shared_ptr<::Core::FileStorageArea > fileStorageArea)
MCAPI void removeListener ()
MCAPI void $onExtendDiskSpace (bool const bSet, ::std::weak_ptr<::Core::FileStorageArea > const &fileStorageAreaWeakPtr, uint64 freeSpace, ::std::function< void()> onHandledEventCallback)

Static Public Member Functions

static MCAPI_C ::brstd::move_only_function< ::std::unique_ptr<::ServerLevel >(::ServerInstanceInitArguments::CreateLevelArguments &&) const > createServerLevelCallback (::ServerInstance::CreateServerLevelOps &&ops)
static MCAPI ::std::string const & ASSET_EXTRACTION_ERROR ()
static MCAPI ::std::string const & ENTITY_REGISTRY_CREATION_ERROR ()
static MCAPI ::std::string const & FINAL_LEVEL_STORAGE_STATE_ERROR ()
static MCAPI ::std::string const & HOST_MULTIPLAYER_ERROR ()
static MCAPI ::std::string const & INITIAL_LEVEL_STORAGE_STATE_ERROR ()
static MCAPI ::std::string const & LEVEL_STORAGE_CREATION_ERROR ()
static MCAPI ::std::string const & PACK_SOURCE_LOADING_ERROR ()
static MCAPI ::std::string const & POST_INIT_ERROR ()
static MCAPI ::std::chrono::nanoseconds const & SERVER_MAX_DELAY_BEFORE_SLOWDOWN ()
static MCAPI void ** $vftableForGameCallbacks ()
static MCAPI void ** $vftableForStorageAreaStateListener ()
static MCAPI void ** $vftableForAppPlatformListener ()
static MCAPI void ** $vftableForEnableNonOwnerReferences ()
static MCAPI void ** $vftable ()
static MCAPI void ** $vftable ()
static MCAPI void ** $vftable ()
static MCAPI void ** $vftable ()

Public Attributes

::ll::TypedStorage< 8, 8, ::std::chrono::steady_clock::time_point > mLastSyncTime
::ll::TypedStorage< 1, 1, bool const > mIsDedicatedServer
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Minecraft > > mMinecraft
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::ServerNetworkSystem > > mNetwork
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::LoopbackPacketSender > > mPacketSender
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Timer > > mSimTimer
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Timer > > mRealTimer
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Scheduler > > mScheduler
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::EducationOptions > > mEducationOptions
::ll::TypedStorage< 8, 8, ::LevelStorage * > mStorage
::ll::TypedStorage< 1, 1, ::std::atomic< bool > > mInUpdate
::ll::TypedStorage< 4, 4, ::std::atomic< int > > mWriteRefCounter
::ll::TypedStorage< 1, 1, ::std::atomic< bool > > mThreadShouldJoin
::ll::TypedStorage< 8, 80, ::Bedrock::Threading::MutexmMutexDestruction
::ll::TypedStorage< 8, 24, ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator > > mEventCoordinator
::ll::TypedStorage< 4, 4, ::std::atomic<::ServerInstance::InstanceState > > mInstanceState
::ll::TypedStorage< 8, 16, ::std::thread > mServerInstanceThread
::ll::TypedStorage< 8, 80, ::Bedrock::Threading::MutexmResumeMutex
::ll::TypedStorage< 8, 72, ::std::condition_variable > mResumeSignal
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Scripting::RegistryManager > > mScriptRegistryManager
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::ServerScriptManager > > mServerScriptManager
::ll::TypedStorage< 8, 64, ::std::function< void(char const *)> > mScriptWatchdogCriticalErrorCallback
::ll::TypedStorage< 8, 64, ::std::function< void(::Connection::DisconnectFailReason, char const *)> > mUnrecoverableErrorCallback
::ll::TypedStorage< 1, 1, bool > mHandledLevelCorruption
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::TextFilteringProcessor > > mTextFilteringProcessor
::ll::TypedStorage< 8, 8, ::std::chrono::microseconds > mWakeupInterval
::ll::TypedStorage< 8, 32, ::std::string > mLevelId
::ll::TypedStorage< 8, 32, ::std::string > mServerName
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::WorldSessionEndPoint > > mWorldSessionEndPoint
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::Core::FileStorageArea > > mStorageAreaForLevel
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::ItemRegistry > > mServerItemRegistry
::ll::TypedStorage< 1, 1, bool > mEnableItemStackNetManager
::ll::TypedStorage< 1, 1, bool > mEnableRealmsStories
::ll::TypedStorage< 1, 1, bool > mbInitialized
::ll::TypedStorage< 1, 1, bool > mbFlaggedForEarlyDestruction
::ll::TypedStorage< 8, 8, ::ServiceRegistrationToken<::ServerInstance > > mServiceRegistrationToken
::ll::TypedStorage< 1, 1, bool > mHasScheduledLeaveGame
::ll::TypedStorage< 1, 1, bool > mCriticalDiskErrorTelemetrySent
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Editor::IEditorManager > > mEditorManager
::ll::TypedStorage< 8, 24, ::Bedrock::NonOwnerPointer<::CDNConfig > > mCDNConfig
::ll::TypedStorage< 8, 24, ::Bedrock::NonOwnerPointer<::ServerTextSettings > > mServerTextSettings
::ll::TypedStorage< 8, 24, ::Bedrock::NotNullNonOwnerPtr<::cereal::ReflectionCtx > > mCerealContext
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::LinkedAssetValidator > > mLinkedAssetValidator
::ll::TypedStorage< 1, 1, ::ServerGraphicsSettingsmGraphicsSettings
::ll::TypedStorage< 8, 8, ::gsl::not_null<::std::unique_ptr<::ServerInstanceMessenger::IMessenger > > > mMessenger
::ll::TypedStorage< 8, 64, ::brstd::move_only_function< bool() const > > mShouldDisableNetworkOnSuspend
::std::shared_ptr<::Bedrock::EnableNonOwnerReferences::ControlBlockmControlBlock
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmLowMemorySubscription
::ll::TypedStorage< 1, 1, bool > mListenerRegistered
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::Core::FileStorageArea > > mFileStorageArea
::ll::TypedStorage< 8, 80, ::Bedrock::Threading::MutexmMutex

Member Function Documentation

◆ onLowMemory()

virtual void ServerInstance::onLowMemory ( ::LowMemorySeverity )
virtual

Reimplemented from AppPlatformListener.

◆ onLevelCorrupt()

virtual void ServerInstance::onLevelCorrupt ( )
virtual

Implements GameCallbacks.

◆ onGameModeChanged()

virtual void ServerInstance::onGameModeChanged ( )
virtual

Implements GameCallbacks.

◆ onTick()

virtual void ServerInstance::onTick ( int nTick,
int maxTick )
virtual

Implements GameCallbacks.

◆ onInternetUpdate()

virtual void ServerInstance::onInternetUpdate ( )
virtual

Implements GameCallbacks.

◆ onGameSessionReset()

virtual void ServerInstance::onGameSessionReset ( )
virtual

Implements GameCallbacks.

◆ onLevelExit()

virtual void ServerInstance::onLevelExit ( )
virtual

Implements GameCallbacks.

◆ onRequestResourceReload()

virtual void ServerInstance::onRequestResourceReload ( )
virtual

Implements GameCallbacks.

◆ onLowDiskSpace()

virtual void ServerInstance::onLowDiskSpace ( bool const bSet)
virtual

Reimplemented from Core::StorageAreaStateListener.

◆ onOutOfDiskSpace()

virtual void ServerInstance::onOutOfDiskSpace ( bool const bSet)
virtual

Reimplemented from Core::StorageAreaStateListener.

◆ onCriticalDiskError()

virtual void ServerInstance::onCriticalDiskError ( bool const bSet,
::Core::LevelStorageState const & errorCode )
virtual

Reimplemented from Core::StorageAreaStateListener.

◆ onAppSuspended()

virtual void ServerInstance::onAppSuspended ( )
virtual

Reimplemented from AppPlatformListener.

◆ onAppResumed()

virtual void ServerInstance::onAppResumed ( )
virtual

Reimplemented from AppPlatformListener.

◆ updateScreens()

virtual void ServerInstance::updateScreens ( )
virtual

Implements GameCallbacks.

◆ $vftableForGameCallbacks()

MCAPI void ** ServerInstance::$vftableForGameCallbacks ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftableForStorageAreaStateListener()

MCAPI void ** ServerInstance::$vftableForStorageAreaStateListener ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftableForAppPlatformListener()

MCAPI void ** ServerInstance::$vftableForAppPlatformListener ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftableForEnableNonOwnerReferences()

MCAPI void ** ServerInstance::$vftableForEnableNonOwnerReferences ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftable() [1/3]

MCAPI void ** Bedrock::EnableNonOwnerReferences::$vftable ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ initListener() [1/2]

MCAPI void AppPlatformListener::initListener ( float priority)
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onAppPaused()

MCAPI void AppPlatformListener::$onAppPaused ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onAppUnpaused()

MCAPI void AppPlatformListener::$onAppUnpaused ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onAppPreSuspended()

MCAPI void AppPlatformListener::$onAppPreSuspended ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onAppFocusLost()

MCAPI void AppPlatformListener::$onAppFocusLost ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onAppFocusGained()

MCAPI void AppPlatformListener::$onAppFocusGained ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onAppTerminated()

MCAPI void AppPlatformListener::$onAppTerminated ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onPerformanceModeChanged()

MCAPI void AppPlatformListener::$onPerformanceModeChanged ( bool const boost)
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onPushNotificationReceived()

MCAPI void AppPlatformListener::$onPushNotificationReceived ( ::PushNotificationMessage const & msg)
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onResizeBegin()

MCAPI void AppPlatformListener::$onResizeBegin ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onResizeEnd()

MCAPI void AppPlatformListener::$onResizeEnd ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onDeviceLost()

MCAPI void AppPlatformListener::$onDeviceLost ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onAppSurfaceCreated()

MCAPI void AppPlatformListener::$onAppSurfaceCreated ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onAppSurfaceDestroyed()

MCAPI void AppPlatformListener::$onAppSurfaceDestroyed ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onClipboardCopy()

MCAPI void AppPlatformListener::$onClipboardCopy ( ::std::string const & )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onClipboardPaste()

MCAPI void AppPlatformListener::$onClipboardPaste ( ::std::string const & )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftable() [2/3]

MCAPI void ** AppPlatformListener::$vftable ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ initListener() [2/2]

MCAPI void Core::StorageAreaStateListener::initListener ( ::std::shared_ptr<::Core::FileStorageArea > fileStorageArea)
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ removeListener()

MCAPI void Core::StorageAreaStateListener::removeListener ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $onExtendDiskSpace()

MCAPI void Core::StorageAreaStateListener::$onExtendDiskSpace ( bool const bSet,
::std::weak_ptr<::Core::FileStorageArea > const & fileStorageAreaWeakPtr,
uint64 freeSpace,
::std::function< void()> onHandledEventCallback )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftable() [3/3]

MCAPI void ** Core::StorageAreaStateListener::$vftable ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following file: