From 2e07ba431d2a0230a1fd847f681679004ffd0aba Mon Sep 17 00:00:00 2001 From: Kezzer <57171715+ItsKezzer@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:21:09 +0200 Subject: [PATCH] (server-properties): - Update generator_settings documentation in server-properties.md --- docs/configuration/server-properties.md | 44 +++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/docs/configuration/server-properties.md b/docs/configuration/server-properties.md index 4570dbf6..f29ff748 100644 --- a/docs/configuration/server-properties.md +++ b/docs/configuration/server-properties.md @@ -38,8 +38,8 @@ docker run -d -e DIFFICULTY=hard ... Valid values are: `peaceful`, `easy`, `normal`, and `hard`, and an error message will be output in the logs if it's not one of these -values. - +values. + Refer to [the Minecraft wiki](https://minecraft.wiki/w/Difficulty) ### Whitelist Players @@ -305,7 +305,45 @@ environment variable set to `false`, such as By default, a standard world is generated with hills, valleys, water, etc. A different level type can be configured by setting `LEVEL_TYPE` to [an expected type listed here](https://minecraft.wiki/w/Server.properties#level-type). -For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation [as described here](https://minecraft.wiki/w/Server.properties#generator-settings). +For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation. + +To configure the `GENERATOR_SEETINGS` you need to add the appropriate `GeneratorOptions` JSON configuration. In the case of a superflat world, you may omit the `flat_world_options`. + +The layers are applied from -64 and up and are added in the order of the list + +Example for a superflat world: + +- 1x bedrock +- 2x stone +- 15x sandstone +- Desert biome + +```json +{ + "layers": [ + { + "block": "minecraft:bedrock", + "height": 1 + }, + { + "block": "minecraft:stone", + "height": 2 + }, + { + "block": "minecraft:sandstone", + "height": 3 + } + ], + "biome": "minecraft:desert" +} +``` + +In a docker compose, it would like like the following: +```yaml +LEVEL_TYPE: FLAT +GENERATOR_SETTINGS: '{"layers": [{"block": "minecraft:bedrock","height": 1},{"block": "minecraft:stone","height": 2},{"block": "minecraft:sandstone","height": 3}]},"biome": "minecraft:desert"}' +``` +For more details, check the [official wiki](https://minecraft.wiki/w/Java_Edition_level_format#generatorOptions_tag_format). ### Custom Server Resource Pack