As I understand it, to replace everything I need to implement WorldGeneratorModifier and replace BiomeGenerator, BaseGeneratorPopulator and all Populators with my own implementations.
Thats correct.
Are you planning to add some other way to replace world generator? Maybe adding custom WorldType with it’s own world generator?
As I mentioned at the bottom its possible that we may add the ability to create some sort of custom GeneratorType (essentially WorldType), but at this point I’m not too sure what the use of this would be. The entire point of WorldGeneratorModifiers is to allow multiple mods to touch the world generator at the same time.
There is also WorldGenerator class that isn’t mentioned in the WorldGen documentation. World class has setWorldGenerator method. As currently there is no configuration for modifiers yet, I think I can use this as well.
You could, but I would heavily discourage this as you would not be compatible with other plugins wanting to make small changes or additions to the world generator. Additionally it may not work quite as you are thinking as it is cloned on set and then never referenced again if you were thinking of using it for anything more than setting the WGen components into the world.
If you’re only using that as a temporary method then you may as well write it in modifier form anyway and inject them using something like this for now until the configuration is added:
@Subscribe
public void onWorldLoad(WorldLoadEvent event)
{
World world = event.getWorld();
if (world.getName().equalsIgnoreCase("name")) {
DataContainer arguments = new MemoryDataContainer();
WorldGenerator worldGenerator = world.getWorldGenerator();
modifyWorldGenerator(world.getCreationSettings(), arguments, worldGenerator);
world.setWorldGenerator(worldGenerator);
}
}
And then as soon as the configuration is added you simply delete that event subscription.
You also wrote that Chunk size may not be 16x256x16 with other implementations.
If it’s higher - it’s probably not an issue. To make difference it must be lower, so together with ChunkLayout class it seems to be some kind of support for 3d chunks implementations. I’m
almost sure that they will be incompatible with custom world generation in SpongeAPI (maybe except biome generation).
Sure it’ll be incompatible with plugins which build in the assumptions about the standard layout. However the point is that we are also not excluding detecting and building in support for these alternate systems.
As an example, Tall Worlds mod uses 4 generation stages instead of 2.
I’m curious what are the 4 stages for their generation?