SPIGOT-6957: Bad default value for WorldCreator#generatorSettings

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2022-03-04 08:15:31 +11:00
parent f43d18915d
commit 33a94c62e0

View file

@ -1034,7 +1034,7 @@ public final class CraftServer implements Server {
WorldSettings worldSettings;
// See MinecraftServer.a(String, String, long, WorldType, JsonElement)
if (worlddata == null) {
DedicatedServerProperties.a properties = new DedicatedServerProperties.a(Objects.toString(creator.seed()), ChatDeserializer.parse(creator.generatorSettings()), creator.generateStructures(), creator.type().name().toLowerCase(Locale.ROOT));
DedicatedServerProperties.a properties = new DedicatedServerProperties.a(Objects.toString(creator.seed()), ChatDeserializer.parse((creator.generatorSettings().isEmpty()) ? "{}" : creator.generatorSettings()), creator.generateStructures(), creator.type().name().toLowerCase(Locale.ROOT));
GeneratorSettings generatorsettings = GeneratorSettings.create(console.registryAccess(), properties);
worldSettings = new WorldSettings(name, EnumGamemode.byId(getDefaultGameMode().getValue()), hardcore, EnumDifficulty.EASY, false, new GameRules(), console.datapackconfiguration);