server.properties generator-settings for level-type FLAT not implemented; property is stored in ignored flat_world_options NBT
The bug
Generation of custom world only using the server.properties on a multi-player server for a FLAT level-type is not possible.
When level-type is FLAT, the generator-settings is parsed into the flat_world_options json property that afaik is never used.
Should be either parsed into this flat_world_options and code should be implemented to convert "preset" data into the appropriate json format that is being put into the generator-settings key of the level.dat or allow using the new json format in generator-settings similar to BUFFET.
Note, that when level-type is BUFFET, the generator-settings take a json string that is directly used for the generator-settings key in the level.dat, so it works as expected.
But for FLAT, it doesn't implements json in this new manner, and doesn't look like it is parsing the flat_world_options as the "preset" or legacy format. Documentation is limited.
Created Issue:
server.properties generator-settings for level-type FLAT not implemented
Generation of custom world only using the server.properties on a multi-player server for a FLAT level-type is not possible.
When level-type is FLAT, the generator-settings is parsed into the "flat_world_options" json property that afaik is never used.
Should be either parsed into this flat_world_options and code should be implemented to convert "preset" data into the appropriate json format that is being put into the generator-settings key of the level.dat.
Note, that when level-type is BUFFET, the generator-settings take a json string that is directly used for the generator-settings key in the level.dat, so it works as expected.
But for FLAT, it neither implements json in this new manner, nor parses the generator settings as a "preset" or legacy FLAT preset.
Environment
multi-player
Generation of custom world only using the server.properties on a multi-player server for a FLAT level-type is not possible.
When level-type is FLAT, the generator-settings is parsed into the "flat_world_options" json property that afaik is never used.
Should be either parsed into this flat_world_options and code should be implemented to convert "preset" data into the appropriate json format that is being put into the generator-settings key of the level.dat or allow using the new json format in generator-settings similar to BUFFET.
Note, that when level-type is BUFFET, the generator-settings take a json string that is directly used for the generator-settings key in the level.dat, so it works as expected.
But for FLAT, it neither implements json in this new manner, nor parses the generator settings as a "preset" or legacy FLAT preset.
Generation of custom world only using the server.properties on a multi-player server for a FLAT level-type is not possible.
When level-type is FLAT, the generator-settings is parsed into the "flat_world_options" json property that afaik is never used.
Should be either parsed into this flat_world_options and code should be implemented to convert "preset" data into the appropriate json format that is being put into the generator-settings key of the level.dat or allow using the new json format in generator-settings similar to BUFFET.
Note, that when level-type is BUFFET, the generator-settings take a json string that is directly used for the generator-settings key in the level.dat, so it works as expected.
But for FLAT, it
neitherimplements json in this new manner,norparsesthegenerator settingsasa"preset" or legacyFLAT preset.
Generation of custom world only using the server.properties on a multi-player server for a FLAT level-type is not possible.
When level-type is FLAT, the generator-settings is parsed into the "flat_world_options" json property that afaik is never used.
Should be either parsed into this flat_world_options and code should be implemented to convert "preset" data into the appropriate json format that is being put into the generator-settings key of the level.dat or allow using the new json format in generator-settings similar to BUFFET.
Note, that when level-type is BUFFET, the generator-settings take a json string that is directly used for the generator-settings key in the level.dat, so it works as expected.
But for FLAT, it doesn't implements json in this new manner, and doesn't look like it is parsing the "flat_world_options" as the "preset" or legacy format. Documentation is limited.
multi-player
Generation of custom world only using the server.properties on a multi-player server for a FLAT level-type is not possible.
When level-type is FLAT, the generator-settings is parsed into the "flat_world_options" json property that afaik is never used.
Should be either parsed into this flat_world_options and code should be implemented to convert "preset" data into the appropriate json format that is being put into the generator-settings key of the level.dat or allow using the new json format in generator-settings similar to BUFFET.
Note, that when level-type is BUFFET, the generator-settings take a json string that is directly used for the generator-settings key in the level.dat, so it works as expected.
But for FLAT, it doesn't implements json in this new manner, and doesn't look like it is parsing the "flat_world_options" as the "preset" or legacy format. Documentation is limited.
The bug
Generation of custom world only using the server.properties on a multi-player server for a FLAT level-type is not possible.
When level-type is FLAT, the generator-settings is parsed into the flat_world_options json property that afaik is never used.
Should be either parsed into this flat_world_options and code should be implemented to convert "preset" data into the appropriate json format that is being put into the generator-settings key of the level.dat or allow using the new json format in generator-settings similar to BUFFET.
Note, that when level-type is BUFFET, the generator-settings take a json string that is directly used for the generator-settings key in the level.dat, so it works as expected.
But for FLAT, it doesn't implements json in this new manner, and doesn't look like it is parsing the flat_world_options as the "preset" or legacy format. Documentation is limited.
relates to
server.properties generator-settings for level-type FLAT not implemented; property is stored in ignored flat_world_options NBT
relates to
As you already figured out, your issue is the generator-settings= string.
This is because level-type=CUSTOMIZED is no longer a thing in 1.13 as support for customized worlds has been dropped in this version. It's currently only the BUFFET level-type which expects a json formatted generator-settings= string.
Other related tickets for those who are interested: MC-134900, MC-135383.
MC-134900 was claimed to be fixed and indeed, the value is no longer ignored, instead it is now automatically edited to a nonsensical value on server start and the server crashes on startup.
Example:
level-type=flat generator-settings="{\"biome\":\"minecraft:plains\",\"layers\":[{\"block\":\"minecraft:diamond_block\",\"height\":1}],structures:{\"village\":{}}}"
When the server starts, it edits the line to:
generator-settings="{"biome"\:"minecraft\:plains","layers"\:[{"block"\:"minecraft\:diamond_block","height"\:1}],structures\:{"village"\:{}}}"
That obviously cannot work, because the string is only "{" and then there is trailing data. Colons also do not need to be escaped, but the server does it anyway. It then crashes with this error message:
[20:29:09] [main/ERROR]: Unable to bootstrap registry 'minecraft:chunk_generator_type' [20:29:09] [main/ERROR]: Registry 'minecraft:chunk_generator_type' was empty after loading [20:29:10] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD' [20:29:10] [main/FATAL]: Failed to start the minecraft server com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonPrimitive at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:913) ~[server.jar:?] at adg.a(SourceFile:493) ~[server.jar:?] at adg.a(SourceFile:545) ~[server.jar:?] at adg.a(SourceFile:541) ~[server.jar:?] at adg.a(SourceFile:549) ~[server.jar:?] at net.minecraft.server.MinecraftServer.a(SourceFile:1049) ~[server.jar:?] at net.minecraft.server.MinecraftServer.main(SourceFile:999) [server.jar:?]
If the generator settings are input without being quoted, like this (which I assume to be wrong) …
generator-settings={"biome":"minecraft:plains","layers":[{"block":"minecraft:diamond_block","height":1}],structures:{"village":{}}}
… then the server edits it to …
generator-settings={"biome"\:"minecraft\:plains","layers"\:[{"block"\:"minecraft\:diamond_block","height"\:1}],structures\:{"village"\:{}}}
… and crashes like this:
[20:33:37] [main/ERROR]: Unable to bootstrap registry 'minecraft:chunk_generator_type' [20:33:37] [main/ERROR]: Registry 'minecraft:chunk_generator_type' was empty after loading [20:33:37] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD' [20:33:37] [main/FATAL]: Failed to start the minecraft server com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 88 path $.layers at adg.a(SourceFile:495) ~[server.jar:?] at adg.a(SourceFile:545) ~[server.jar:?] at adg.a(SourceFile:541) ~[server.jar:?] at adg.a(SourceFile:549) ~[server.jar:?] at net.minecraft.server.MinecraftServer.a(SourceFile:1049) ~[server.jar:?] at net.minecraft.server.MinecraftServer.main(SourceFile:999) [server.jar:?] Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 88 path $.layers at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559) ~[server.jar:?] at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401) ~[server.jar:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:508) ~[server.jar:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:414) ~[server.jar:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:738) ~[server.jar:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714) ~[server.jar:?] at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:910) ~[server.jar:?] at adg.a(SourceFile:493) ~[server.jar:?] ... 5 more
Again, quoted colons for no reason.
Back when I created the server, I copied the world from singleplayer and set "leve-type" to "flat". I think, due to bug MC-134900, I wasn't given any error then (my "generator-settings" has always been blank) but now I am. Am I right? If that's the case, I should close this issue.
Can confirm. I've been digging around, but flat_world_options is completely ignored. This ignores server.properties's generator-settings property when level-type is FLAT. This is quite annoying..
Edit: http://supa.me/E0E2kR.png On the left is "The Void" preset generated using single player. On the right is the string from The Void preset in generator-settings.
Affects 1.14 and 1.14.1
This also affects 1.15, 1.15.1, 1.15.2 Pre-release 1, and 1.15.2 Pre-release 2.
This bug is still present in 20w06a.