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

Public Types

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

Public Member Functions

virtual void onLowMemory ()
 
virtual void onLevelCorrupt ()
 
virtual void onCriticalScriptError (char const *clientDisconnectMessage, char const *logMessage)
 
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 (::IMinecraftApp &app, ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator > const &coordinator)
 
MCAPI void _resetServerScriptManager ()
 
MCAPI void _shutdownStorage (::Bedrock::UniqueOwnerPointer<::LevelStorage > &storage)
 
MCAPI void _update ()
 
MCAPI bool _useClientSideChunkGeneration (::LevelData *levelData) const
 
MCAPI void disconnectAllClientsWithMessage (::std::string msg)
 
MCAPI ::Bedrock::NonOwnerPointer<::Editor::IEditorManagergetEditorManager () const
 
MCAPI::ItemRegistryRef getServerItemRegistry () const
 
MCAPI bool initializeServer (::IMinecraftApp &app, ::AllowList &allowList, ::PermissionsFile *permissionsFile, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager > const &pathManager, ::std::chrono::seconds maxPlayerIdleTime, ::std::string levelId, ::std::string levelName, ::std::string serverName, ::LevelSettings levelSettings, int maxChunkRadius, bool connectionDefinition, ::ConnectionDefinition networkServerConfig, ::NetworkServerConfig localPlayerId, ::mce::UUID const &eventing, ::IMinecraftEventing &resourcePackRepository, ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository > const &contentTierManager, ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const > const &clientResourcePackManager, ::ResourcePackManager &createLevelStorageCallback, ::std::function<::Bedrock::UniqueOwnerPointer<::LevelStorage >(::Scheduler &)> basePath, ::std::string const &levelData, ::Bedrock::NotNullNonOwnerPtr<::LevelData > playerSafetyServiceTextProcessorConfig, ::std::string serverId, ::std::string applicationId, ::std::string applicationTenantId, ::std::string educationOptions, ::std::unique_ptr<::EducationOptions > criticalSaveCallback, ::ResourcePackManager *compactionCallback, ::std::function< void()> serverMetrics, ::std::function< void()> debugEndPoint, ::ServerMetrics *enableWorldSessionEndPoint, ::DebugEndPoint *storageAreaForLevel, bool networkSettings, ::std::shared_ptr<::Core::FileStorageArea > enableItemStackNetManager, ::NetworkSettingOptions const &enableItemTransactionLogger, bool playerMovementSettings, bool scriptSettings, ::std::optional<::PlayerMovementSettings > levelExperiments, ::ScriptSettings &&isServerVisibleToLanDiscovery, ::Experiments const &enablePacketRateLimiting, bool worldSizeMB, bool clientSideGenerationEnabled, float blockNetworkIdsAreHashes, ::std::optional< bool > networkSessionOwner, ::ForceBlockNetworkIdsAreHashes cdnConfig, ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner > serverTextSettings, ::Bedrock::NonOwnerPointer<::CDNConfig > shouldAnnounce, ::Bedrock::NonOwnerPointer<::ServerTextSettings > localServerResourcePackManager)
 
MCAPI void leaveGameSync ()
 
MCAPI void queueForServerThread (::std::function< void()> command)
 
MCAPI void setScriptWatchdogCriticalErrorCallback (::std::function< void(char const *)> criticalErrorCallback)
 
MCAPI void setUnrecoverableErrorCallback (::std::function< void(char const *, char const *)> unrecoverableErrorCallback)
 
MCAPI void setWakeupFrequency (int hertz)
 
MCAPI void startLeaveGame ()
 
MCAPI void startServerThread ()
 
MCAPI void * $ctor (::IMinecraftApp &app, ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator > const &coordinator)
 
MCAPI void $dtor ()
 
MCAPI void $onLowMemory ()
 
MCAPI void $onLevelCorrupt ()
 
MCAPI void $onCriticalScriptError (char const *clientDisconnectMessage, char const *logMessage)
 
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)
 
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)
 
MCFOLD void $onAppPaused ()
 
MCFOLD void $onAppUnpaused ()
 
MCFOLD void $onAppPreSuspended ()
 
MCFOLD void $onAppFocusLost ()
 
MCFOLD void $onAppFocusGained ()
 
MCFOLD void $onAppTerminated ()
 
MCFOLD void $onPerformanceModeChanged (bool const boost)
 
MCFOLD void $onPushNotificationReceived (::PushNotificationMessage const &msg)
 
MCFOLD void $onResizeBegin ()
 
MCFOLD void $onResizeEnd ()
 
MCFOLD void $onDeviceLost ()
 
MCFOLD void $onAppSurfaceCreated ()
 
MCFOLD void $onAppSurfaceDestroyed ()
 
MCFOLD void $onClipboardCopy (::std::string const &)
 
MCFOLD void $onClipboardPaste (::std::string const &)
 
virtual void onBeforeSimTick ()
 
MCFOLD void $onBeforeSimTick ()
 
virtual void onExtendDiskSpace (bool const bSet, ::std::weak_ptr<::Core::FileStorageArea > &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 > &fileStorageAreaWeakPtr, uint64 freeSpace, ::std::function< void()> onHandledEventCallback)
 

Static Public Member Functions

static MCAPI bool forceOffClientChunkGeneration (::LevelData &levelData)
 
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< 8, 8, ::IMinecraftApp const & > mApp
 
::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, 80, ::SPSCQueue<::std::function< void()>, 512 > > mCommandQueue
 
::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<::ServerScriptManager > > mServerScriptManager
 
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Scripting::RegistryManager > > mScriptRegistryManager
 
::ll::TypedStorage< 8, 64, ::std::function< void(char const *)> > mScriptWatchdogCriticalErrorCallback
 
::ll::TypedStorage< 8, 64, ::std::function< void(char const *, 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, 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< 8, 16, ::std::shared_ptr<::BlockTypeRegistry > > mBlockRegistry
 
::ll::TypedStorage< 1, 1, bool > mEnableItemStackNetManager
 
::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
 
::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 ( )
virtual

Reimplemented from AppPlatformListener.

◆ onLevelCorrupt()

virtual void ServerInstance::onLevelCorrupt ( )
virtual

Implements GameCallbacks.

◆ onCriticalScriptError()

virtual void ServerInstance::onCriticalScriptError ( char const * clientDisconnectMessage,
char const * logMessage )
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.


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