mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCE-Revelations.git
synced 2026-05-31 07:05:40 +00:00
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:
@@ -13,6 +13,15 @@ LevelData::LevelData()
|
||||
LevelData::LevelData(CompoundTag *tag)
|
||||
{
|
||||
seed = tag->getLong(L"RandomSeed");
|
||||
|
||||
// Allow server.properties to override the world seed for biome generation
|
||||
// on existing worlds (e.g. to fix monotonous biomes after world expansion).
|
||||
if (app.HasSeedOverride())
|
||||
{
|
||||
app.DebugPrintf("Overriding world seed: %lld -> %lld\n", seed, app.GetSeedOverride());
|
||||
seed = app.GetSeedOverride();
|
||||
}
|
||||
|
||||
m_pGenerator = LevelType::lvl_normal;
|
||||
if (tag->contains(L"generatorName"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user