Will there be configuration for setting terrain generator per world?

World generator API already exists, but I can’t find any information how will it be possible to use specified terrain generator for some world. Craftbukkit had bukkit.yml to set terrain generator. Will something like this exist in Sponge? Or will the plugin be responsible for setting terrain generator?

That’s a good question. First of all, it will probably be implementation-dependent.
Maybe this can be configured in the sponge.conf, the main config file for Sponge.

I guess it doesn’t make sense to outsource this to a plugin.

If it will be implementation dependent, then there there should be some predefined way to create instance of WorldGenerator, currently I don’t see anything like this. Bukkit had special method in JavaPlugin class.
When I first saw World Generator API added to SpongeAPI, I thought that it could already be done with the API, I didn’t see any comments about it.

Do you mean there should be a way to get a WorlGenerator by name?
Something like gameRegistry.getWorldGenerator(String name)?

I mean that there should be some way for the server to know how to get instance of the WorldGenerator.
Bukkit had JavaPlugin.getDefaultWorldGenerator(worldName, id), and plugin implemented it.
Currently even if it would be configurable - server has no way to construct the WorldGenerator object.

That’s true. Can you submit an issue on GitHub? That’s a serious problem…

Created new issue.
Actually I’m suprised that nobody thought about it before…

What just came to my mind reading this is that it would be pretty nice to have an implementation for scripted terrain generators.
That way also server owners who aren’t familiar with programming could quite easily write tehir own custom terrain generators for tehir server.

This is something plugins could do. And scripted world generators would be slower.

1 Like