using generator settings from WorldCreator to specify presets for FLAT or CUSTOMIZED world types

This commit is contained in:
TheCutter 2014-12-05 19:55:52 +01:00 committed by md_5
parent 9fa497cd55
commit fe8d20e376

View File

@ -848,7 +848,9 @@ public final class CraftServer implements Server {
IDataManager sdm = new ServerNBTManager(getWorldContainer(), name, true); IDataManager sdm = new ServerNBTManager(getWorldContainer(), name, true);
WorldData worlddata = sdm.getWorldData(); WorldData worlddata = sdm.getWorldData();
if (worlddata == null) { if (worlddata == null) {
worlddata = new WorldData(new WorldSettings(creator.seed(), EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type), name); WorldSettings worldSettings = new WorldSettings(creator.seed(), EnumGamemode.getById(getDefaultGameMode().getValue()), generateStructures, hardcore, type);
worldSettings.setGeneratorSettings(creator.generatorSettings());
worlddata = new WorldData(worldSettings, name);
} }
worlddata.checkName(name); // CraftBukkit - Migration did not rewrite the level.dat; This forces 1.8 to take the last loaded world as respawn (in this case the end) worlddata.checkName(name); // CraftBukkit - Migration did not rewrite the level.dat; This forces 1.8 to take the last loaded world as respawn (in this case the end)
WorldServer internal = (WorldServer) new WorldServer(console, sdm, worlddata, dimension, console.methodProfiler, creator.environment(), generator).b(); WorldServer internal = (WorldServer) new WorldServer(console, sdm, worlddata, dimension, console.methodProfiler, creator.environment(), generator).b();