Add seed validation for server world creation and override-seed property

The dedicated server previously picked a completely random seed with no
biome diversity checks (the client validates but the server skipped it).
On top of that, the client's findSeed() was hardcoded to only check a
54-chunk (Classic) area, so Large worlds had no diversity guarantee
beyond the center.

New server worlds now use findSeed() scaled to the full target world
size. Added override-seed in server.properties to fix existing worlds
without deleting them.
This commit is contained in:
itsRevela
2026-03-24 13:07:04 -05:00
parent 5dad6c24f7
commit 08f14e32ae
10 changed files with 66 additions and 9 deletions

View File

@@ -735,10 +735,11 @@ bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DW
if( findSeed )
{
int worldSizeChunks = (initData && initData->xzSize > 0) ? (int)initData->xzSize : 54;
#ifdef __PSVITA__
seed = BiomeSource::findSeed(pLevelType, &running);
seed = BiomeSource::findSeed(pLevelType, &running, worldSizeChunks);
#else
seed = BiomeSource::findSeed(pLevelType);
seed = BiomeSource::findSeed(pLevelType, worldSizeChunks);
#endif
}