Terrain Generation Guide
It is possible to use your own custom terrain generation in your server.
Note: Custom terrain generation is still in early development.
Using a custom terrain generator
To do this, we'll get a copy of the default terrain generator, then set our Lua script to use it.
- Launch a server
- Run this command in chat:
/saveterraingeneratorjson
This will save the JSON file in your server folder. - Open the Lua script for your gamemode.
- Add
Level:setTerrainGeneratorJoiseJSONFile("terrain-generator.json")
somewhere in your Lua script.
That's all, once you reload the map it will use your json config to generate the terrain!
Modifying the terrain generator
The JSON file has several noise generation modules which are linked together to describe the terrain features. They're based on the Joise library.
The resulting values should correspond to block ID's.
Note: There is a terrain visualiser which I might release if there's enough interest. It makes it easier to work on the terrain generation and seeing changes quickly.