mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-08-20 09:57:09 +00:00
refactor: Remove worldSizeChunks param from BiomeSource::findSeed
This commit is contained in:
parent
2ddf72a4eb
commit
00af47178d
|
|
@ -742,7 +742,9 @@ bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DW
|
||||||
#ifdef __PSVITA__
|
#ifdef __PSVITA__
|
||||||
seed = BiomeSource::findSeed(pLevelType, &running, worldSizeChunks);
|
seed = BiomeSource::findSeed(pLevelType, &running, worldSizeChunks);
|
||||||
#else
|
#else
|
||||||
seed = BiomeSource::findSeed(pLevelType, worldSizeChunks);
|
// LordCambion changes removed the worldSizeChunks param from BiomeSource#findSeed
|
||||||
|
// seed = BiomeSource::findSeed(pLevelType, worldSizeChunks);
|
||||||
|
seed = BiomeSource::findSeed(pLevelType);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -650,8 +650,10 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// Only run seed validation when creating a brand-new world.
|
// Only run seed validation when creating a brand-new world.
|
||||||
// Existing worlds already have their seed in level.dat.
|
// Existing worlds already have their seed in level.dat.
|
||||||
LogInfof("startup", "Finding seed with biome diversity for %d-chunk world...", config.worldSizeChunks);
|
LogInfof("startup", "Finding seed with biome diversity for %d-chunk world...", config.worldSizeChunks);
|
||||||
param->seed = BiomeSource::findSeed(LevelType::lvl_normal, config.worldSizeChunks);
|
// LordCambion changes removed the worldSizeChunks param from BiomeSource#findSeed
|
||||||
|
// param->seed = BiomeSource::findSeed(LevelType::lvl_normal, config.worldSizeChunks);
|
||||||
|
param->seed = BiomeSource::findSeed(LevelType::lvl_normal);
|
||||||
LogInfof("startup", "Selected seed: %lld", param->seed);
|
LogInfof("startup", "Selected seed: %lld", param->seed);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -735,7 +737,7 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autosaveRequested && app.GetXuiServerAction(kServerActionPad) == eXuiServerAction_Idle && !ConsoleSaveFileOriginal::hasPendingBackgroundSave())
|
if (autosaveRequested && app.GetXuiServerAction(kServerActionPad) == eXuiServerAction_Idle)
|
||||||
{
|
{
|
||||||
LogWorldIO("autosave completed");
|
LogWorldIO("autosave completed");
|
||||||
autosaveRequested = false;
|
autosaveRequested = false;
|
||||||
|
|
@ -749,7 +751,7 @@ int main(int argc, char **argv)
|
||||||
DWORD now = GetTickCount();
|
DWORD now = GetTickCount();
|
||||||
if ((LONG)(now - nextAutosaveTick) >= 0)
|
if ((LONG)(now - nextAutosaveTick) >= 0)
|
||||||
{
|
{
|
||||||
if (app.GetXuiServerAction(kServerActionPad) == eXuiServerAction_Idle && !ConsoleSaveFileOriginal::hasPendingBackgroundSave())
|
if (app.GetXuiServerAction(kServerActionPad) == eXuiServerAction_Idle)
|
||||||
{
|
{
|
||||||
LogWorldIO("requesting autosave");
|
LogWorldIO("requesting autosave");
|
||||||
app.SetXuiServerAction(kServerActionPad, eXuiServerAction_AutoSaveGame);
|
app.SetXuiServerAction(kServerActionPad, eXuiServerAction_AutoSaveGame);
|
||||||
|
|
@ -768,18 +770,16 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
LogInfof("shutdown", "Dedicated server stopped");
|
LogInfof("shutdown", "Dedicated server stopped");
|
||||||
MinecraftServer *server = MinecraftServer::getInstance();
|
MinecraftServer *server = MinecraftServer::getInstance();
|
||||||
if (server != NULL && !ConsoleSaveFileOriginal::hasPendingBackgroundSave())
|
if (server != NULL)
|
||||||
|
{
|
||||||
|
server->setSaveOnExit(true);
|
||||||
|
}
|
||||||
|
if (server != NULL)
|
||||||
{
|
{
|
||||||
server->setSaveOnExit(true);
|
|
||||||
LogWorldIO("requesting save before shutdown");
|
LogWorldIO("requesting save before shutdown");
|
||||||
LogWorldIO("using saveOnExit for shutdown");
|
LogWorldIO("using saveOnExit for shutdown");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConsoleSaveFileOriginal::hasPendingBackgroundSave())
|
|
||||||
{
|
|
||||||
LogWorldIO("Waiting for autosave to complete...");
|
|
||||||
}
|
|
||||||
|
|
||||||
MinecraftServer::HaltServer();
|
MinecraftServer::HaltServer();
|
||||||
|
|
||||||
if (g_NetworkManager.ServerStoppedValid())
|
if (g_NetworkManager.ServerStoppedValid())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue