-
Bug
-
Resolution: Invalid
-
None
-
20w18a
-
None
-
Confirmed
-
Crash
-
Very Important
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.