Commits
md_5 authored 21fe78aa4f9
1027 1027 | throw new RuntimeException(ex); |
1028 1028 | } |
1029 1029 | |
1030 1030 | boolean hardcore = creator.hardcore(); |
1031 1031 | |
1032 1032 | WorldDataServer worlddata = (WorldDataServer) worldSession.getDataTag(console.registryreadops, console.datapackconfiguration, console.registryHolder.allElementsLifecycle()); |
1033 1033 | |
1034 1034 | WorldSettings worldSettings; |
1035 1035 | // See MinecraftServer.a(String, String, long, WorldType, JsonElement) |
1036 1036 | if (worlddata == null) { |
1037 - | DedicatedServerProperties.a properties = new DedicatedServerProperties.a(Objects.toString(creator.seed()), ChatDeserializer.parse(creator.generatorSettings()), creator.generateStructures(), creator.type().name().toLowerCase(Locale.ROOT)); |
1037 + | 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)); |
1038 1038 | |
1039 1039 | GeneratorSettings generatorsettings = GeneratorSettings.create(console.registryAccess(), properties); |
1040 1040 | worldSettings = new WorldSettings(name, EnumGamemode.byId(getDefaultGameMode().getValue()), hardcore, EnumDifficulty.EASY, false, new GameRules(), console.datapackconfiguration); |
1041 1041 | worlddata = new WorldDataServer(worldSettings, generatorsettings, Lifecycle.stable()); |
1042 1042 | } |
1043 1043 | worlddata.checkName(name); |
1044 1044 | worlddata.setModdedInfo(console.getServerModName(), console.getModdedStatus().shouldReportAsModified()); |
1045 1045 | |
1046 1046 | if (console.options.has("forceUpgrade")) { |
1047 1047 | net.minecraft.server.Main.forceUpgrade(worldSession, DataConverterRegistry.getDataFixer(), console.options.has("eraseCache"), () -> { |