68 enum class InstanceState :
int {
79 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastSyncTime;
80 ::ll::TypedStorage<8, 8, ::IMinecraftApp const&> mApp;
81 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Minecraft>> mMinecraft;
82 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ServerNetworkSystem>> mNetwork;
83 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LoopbackPacketSender>> mPacketSender;
84 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Timer>> mSimTimer;
85 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Timer>> mRealTimer;
86 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Scheduler>> mScheduler;
87 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::EducationOptions>> mEducationOptions;
88 ::ll::TypedStorage<8, 8, ::LevelStorage*> mStorage;
89 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mInUpdate;
90 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mWriteRefCounter;
91 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mThreadShouldJoin;
92 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMutexDestruction;
93 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator>> mEventCoordinator;
94 ::ll::TypedStorage<4, 4, ::std::atomic<::ServerInstance::InstanceState>> mInstanceState;
95 ::ll::TypedStorage<8, 80,
::SPSCQueue<::std::function<void()>, 512>> mCommandQueue;
96 ::ll::TypedStorage<8, 16, ::std::thread> mServerInstanceThread;
97 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mResumeMutex;
98 ::ll::TypedStorage<8, 72, ::std::condition_variable> mResumeSignal;
99 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ServerScriptManager>> mServerScriptManager;
100 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Scripting::RegistryManager>> mScriptRegistryManager;
101 ::ll::TypedStorage<8, 64, ::std::function<void(
char const*)>> mScriptWatchdogCriticalErrorCallback;
102 ::ll::TypedStorage<8, 64, ::std::function<void(
char const*,
char const*)>> mUnrecoverableErrorCallback;
103 ::ll::TypedStorage<1, 1, bool> mHandledLevelCorruption;
104 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TextFilteringProcessor>> mTextFilteringProcessor;
105 ::ll::TypedStorage<8, 8, ::std::chrono::microseconds> mWakeupInterval;
106 ::ll::TypedStorage<8, 32, ::std::string> mLevelId;
107 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WorldSessionEndPoint>> mWorldSessionEndPoint;
108 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Core::FileStorageArea>> mStorageAreaForLevel;
109 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ItemRegistry>> mServerItemRegistry;
110 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BlockTypeRegistry>> mBlockRegistry;
111 ::ll::TypedStorage<1, 1, bool> mEnableItemStackNetManager;
112 ::ll::TypedStorage<1, 1, bool> mbInitialized;
113 ::ll::TypedStorage<1, 1, bool> mbFlaggedForEarlyDestruction;
114 ::ll::TypedStorage<8, 8, ::ServiceRegistrationToken<::ServerInstance>> mServiceRegistrationToken;
115 ::ll::TypedStorage<1, 1, bool> mHasScheduledLeaveGame;
116 ::ll::TypedStorage<1, 1, bool> mCriticalDiskErrorTelemetrySent;
117 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Editor::IEditorManager>> mEditorManager;
118 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::CDNConfig>> mCDNConfig;
119 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::ServerTextSettings>> mServerTextSettings;
120 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::cereal::ReflectionCtx>> mCerealContext;
130 virtual void onLowMemory() ;
133 virtual void onLevelCorrupt() ;
136 virtual void onCriticalScriptError(
char const* clientDisconnectMessage,
char const* logMessage) ;
139 virtual void onGameModeChanged() ;
142 virtual void onTick(
int nTick,
int maxTick) ;
145 virtual void onInternetUpdate() ;
148 virtual void onGameSessionReset() ;
151 virtual void onLevelExit() ;
154 virtual void onRequestResourceReload() ;
157 virtual void onLowDiskSpace(
bool const bSet) ;
160 virtual void onOutOfDiskSpace(
bool const bSet) ;
163 virtual void onCriticalDiskError(
bool const bSet, ::Core::LevelStorageState
const& errorCode) ;
166 virtual void onAppSuspended() ;
169 virtual void onAppResumed() ;
172 virtual void updateScreens() ;
180 ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator>
const& coordinator
183 MCAPI
void _resetServerScriptManager();
187 MCAPI
void _update();
189 MCAPI
bool _useClientSideChunkGeneration(
::LevelData* levelData)
const;
191 MCAPI
void disconnectAllClientsWithMessage(::std::string msg);
193 MCAPI ::Bedrock::NonOwnerPointer<::Editor::IEditorManager> getEditorManager()
const;
195 MCAPI ::ItemRegistryRef getServerItemRegistry()
const;
197 MCAPI
bool initializeServer(
201 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>
const& pathManager,
202 ::std::chrono::seconds maxPlayerIdleTime,
203 ::std::string levelId,
204 ::std::string levelName,
205 ::std::string serverName,
208 bool connectionDefinition,
213 ::Bedrock::NotNullNonOwnerPtr<::IResourcePackRepository>
const& contentTierManager,
214 ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const>
const& clientResourcePackManager,
217 ::std::string
const& levelData,
218 ::Bedrock::NotNullNonOwnerPtr<::LevelData> playerSafetyServiceTextProcessorConfig,
219 ::std::string serverId,
220 ::std::string applicationId,
221 ::std::string applicationTenantId,
222 ::std::string educationOptions,
223 ::std::unique_ptr<::EducationOptions> criticalSaveCallback,
225 ::std::function<
void()> serverMetrics,
226 ::std::function<
void()> debugEndPoint,
229 bool networkSettings,
230 ::std::shared_ptr<::Core::FileStorageArea> enableItemStackNetManager,
232 bool playerMovementSettings,
234 ::std::optional<::PlayerMovementSettings> levelExperiments,
238 bool clientSideGenerationEnabled,
239 float blockNetworkIdsAreHashes,
240 ::std::optional<bool> networkSessionOwner,
241 ::ForceBlockNetworkIdsAreHashes cdnConfig,
242 ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner> serverTextSettings,
247 MCAPI
void leaveGameSync();
249 MCAPI
void queueForServerThread(::std::function<
void()> command);
251 MCAPI
void setScriptWatchdogCriticalErrorCallback(::std::function<
void(
char const*)> criticalErrorCallback);
253 MCAPI
void setUnrecoverableErrorCallback(::std::function<
void(
char const*,
char const*)> unrecoverableErrorCallback
256 MCAPI
void setWakeupFrequency(
int hertz);
258 MCAPI
void startLeaveGame();
260 MCAPI
void startServerThread();
266 MCAPI
static bool forceOffClientChunkGeneration(
::LevelData& levelData);
272 MCAPI static ::std::chrono::nanoseconds
const& SERVER_MAX_DELAY_BEFORE_SLOWDOWN();
279 $ctor(
::IMinecraftApp& app, ::Bedrock::NotNullNonOwnerPtr<::ServerInstanceEventCoordinator>
const& coordinator);
291 MCAPI
void $onLowMemory();
293 MCAPI
void $onLevelCorrupt();
295 MCAPI
void $onCriticalScriptError(
char const* clientDisconnectMessage,
char const* logMessage);
297 MCFOLD
void $onGameModeChanged();
299 MCFOLD
void $onTick(
int nTick,
int maxTick);
301 MCFOLD
void $onInternetUpdate();
303 MCFOLD
void $onGameSessionReset();
305 MCFOLD
void $onLevelExit();
307 MCAPI
void $onRequestResourceReload();
309 MCAPI
void $onLowDiskSpace(
bool const bSet);
311 MCAPI
void $onOutOfDiskSpace(
bool const bSet);
313 MCAPI
void $onCriticalDiskError(
bool const bSet, ::Core::LevelStorageState
const& errorCode);
315 MCAPI
void $onAppSuspended();
317 MCAPI
void $onAppResumed();
319 MCFOLD
void $updateScreens();
325 MCAPI
static void** $vftableForGameCallbacks();
327 MCAPI
static void** $vftableForStorageAreaStateListener();
329 MCAPI
static void** $vftableForAppPlatformListener();
331 MCAPI
static void** $vftableForEnableNonOwnerReferences();