77 enum class InstanceState :
int {
88 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastSyncTime;
89 ::ll::TypedStorage<8, 8, ::IMinecraftApp const&> mApp;
90 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Minecraft>> mMinecraft;
91 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ServerNetworkSystem>> mNetwork;
92 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LoopbackPacketSender>> mPacketSender;
93 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Timer>> mSimTimer;
94 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Timer>> mRealTimer;
95 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Scheduler>> mScheduler;
96 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::EducationOptions>> mEducationOptions;
97 ::ll::TypedStorage<8, 8, ::LevelStorage*> mStorage;
98 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mInUpdate;
99 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mWriteRefCounter;
100 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mThreadShouldJoin;
101 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMutexDestruction;
102 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator>> mEventCoordinator;
103 ::ll::TypedStorage<4, 4, ::std::atomic<::ServerInstance::InstanceState>> mInstanceState;
104 ::ll::TypedStorage<8, 80,
::SPSCQueue<::std::function<void()>, 512>> mCommandQueue;
105 ::ll::TypedStorage<8, 16, ::std::thread> mServerInstanceThread;
106 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mResumeMutex;
107 ::ll::TypedStorage<8, 72, ::std::condition_variable> mResumeSignal;
108 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Scripting::RegistryManager>> mScriptRegistryManager;
109 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ServerScriptManager>> mServerScriptManager;
110 ::ll::TypedStorage<8, 64, ::std::function<void(
char const*)>> mScriptWatchdogCriticalErrorCallback;
111 ::ll::TypedStorage<8, 64, ::std::function<void(
char const*,
char const*)>> mUnrecoverableErrorCallback;
112 ::ll::TypedStorage<1, 1, bool> mHandledLevelCorruption;
113 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TextFilteringProcessor>> mTextFilteringProcessor;
114 ::ll::TypedStorage<8, 8, ::std::chrono::microseconds> mWakeupInterval;
115 ::ll::TypedStorage<8, 32, ::std::string> mLevelId;
116 ::ll::TypedStorage<8, 32, ::std::string> mServerName;
117 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WorldSessionEndPoint>> mWorldSessionEndPoint;
118 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Core::FileStorageArea>> mStorageAreaForLevel;
119 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ItemRegistry>> mServerItemRegistry;
120 ::ll::TypedStorage<1, 1, bool> mEnableItemStackNetManager;
121 ::ll::TypedStorage<1, 1, bool> mEnableRealmsStories;
122 ::ll::TypedStorage<1, 1, bool> mbInitialized;
123 ::ll::TypedStorage<1, 1, bool> mbFlaggedForEarlyDestruction;
124 ::ll::TypedStorage<8, 8, ::ServiceRegistrationToken<::ServerInstance>> mServiceRegistrationToken;
125 ::ll::TypedStorage<1, 1, bool> mHasScheduledLeaveGame;
126 ::ll::TypedStorage<1, 1, bool> mCriticalDiskErrorTelemetrySent;
127 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Editor::IEditorManager>> mEditorManager;
128 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::CDNConfig>> mCDNConfig;
129 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::ServerTextSettings>> mServerTextSettings;
130 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::cereal::ReflectionCtx>> mCerealContext;
131 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LinkedAssetValidator>> mLinkedAssetValidator;
132 ::ll::TypedStorage<1, 1, ::ServerGraphicsSettings> mGraphicsSettings;
148 virtual void onLowMemory(::LowMemorySeverity) ;
151 virtual void onLevelCorrupt() ;
154 virtual void onCriticalScriptError(
char const* clientDisconnectMessage,
char const* logMessage) ;
157 virtual void onGameModeChanged() ;
160 virtual void onTick(
int nTick,
int maxTick) ;
163 virtual void onInternetUpdate() ;
166 virtual void onGameSessionReset() ;
169 virtual void onLevelExit() ;
172 virtual void onRequestResourceReload() ;
175 virtual void onLowDiskSpace(
bool const bSet) ;
178 virtual void onOutOfDiskSpace(
bool const bSet) ;
181 virtual void onCriticalDiskError(
bool const bSet, ::Core::LevelStorageState
const& errorCode) ;
184 virtual void onAppSuspended() ;
187 virtual void onAppResumed() ;
190 virtual void updateScreens() ;
198 ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator>
const& coordinator
201 MCAPI
void _resetServerScriptManager();
205 MCAPI
void _update();
207 MCAPI
bool _useClientSideChunkGeneration(
::LevelData* levelData)
const;
209 MCAPI
void disconnectAllClientsWithMessage(::std::string msg);
211 MCAPI ::Bedrock::NonOwnerPointer<::Editor::IEditorManager> getEditorManager()
const;
213 MCAPI ::ItemRegistryRef getServerItemRegistry()
const;
215 MCAPI
bool initializeServer(
219 ::std::optional<::PacketGroupDefinition::PacketGroupBuilder> packetGroupBuilder,
220 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>
const& pathManager,
221 ::std::chrono::seconds maxPlayerIdleTime,
222 ::std::string levelId,
223 ::std::string levelName,
224 ::std::string serverName,
232 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>
const& resourcePackRepository,
233 ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const>
const& contentTierManager,
236 ::std::string
const& basePath,
237 ::Bedrock::NotNullNonOwnerPtr<::LevelData> levelData,
238 ::std::unique_ptr<::EducationOptions> educationOptions,
240 ::std::function<
void()> criticalSaveCallback,
241 ::std::function<
void()> compactionCallback,
244 bool enableWorldSessionEndPoint,
245 ::std::shared_ptr<::Core::FileStorageArea> storageAreaForLevel,
247 bool enableItemStackNetManager,
248 bool enableItemTransactionLogger,
249 bool enableRealmsStories,
250 ::std::optional<::PlayerMovementSettings> playerMovementSettings,
253 bool disableLanSignaling,
254 bool isServerVisibleToLanDiscovery,
255 bool enablePacketRateLimiting,
257 ::std::optional<bool> clientSideGenerationEnabled,
258 ::ForceBlockNetworkIdsAreHashes blockNetworkIdsAreHashes,
259 ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner> networkSessionOwner,
263 ::NetherNet::LogSeverity defaultLogSeverity,
265 ::std::optional<::NetherNet::NetworkID> netherNetId,
267 ::std::optional<bool> disableClientVibrantVisuals,
268 ::std::unique_ptr<::IPacketSerializationController> packetController
271 MCAPI
void leaveGameSync();
273 MCAPI
void queueForServerThread(::std::function<
void()> command);
275 MCAPI
void setScriptWatchdogCriticalErrorCallback(::std::function<
void(
char const*)> criticalErrorCallback);
278 setUnrecoverableErrorCallback(::std::function<
void(
char const*,
char const*)> unrecoverableErrorCallback);
280 MCAPI
void startLeaveGame();
282 MCAPI
void startServerThread();
288 MCAPI
static bool forceOffClientChunkGeneration(
::LevelData& levelData);
294 MCAPI static ::std::chrono::nanoseconds
const& SERVER_MAX_DELAY_BEFORE_SLOWDOWN();
301 $ctor(
::IMinecraftApp& app, ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator>
const& coordinator);
313 MCAPI
void $onLowMemory(::LowMemorySeverity);
315 MCAPI
void $onLevelCorrupt();
317 MCAPI
void $onCriticalScriptError(
char const* clientDisconnectMessage,
char const* logMessage);
319 MCFOLD
void $onGameModeChanged();
321 MCFOLD
void $onTick(
int nTick,
int maxTick);
323 MCFOLD
void $onInternetUpdate();
325 MCFOLD
void $onGameSessionReset();
327 MCFOLD
void $onLevelExit();
329 MCAPI
void $onRequestResourceReload();
331 MCAPI
void $onLowDiskSpace(
bool const bSet);
333 MCAPI
void $onOutOfDiskSpace(
bool const bSet);
335 MCAPI
void $onCriticalDiskError(
bool const bSet, ::Core::LevelStorageState
const& errorCode);
337 MCAPI
void $onAppSuspended();
339 MCAPI
void $onAppResumed();
341 MCFOLD
void $updateScreens();