public interface WorldGeneratorModifier extends CatalogType
modifyWorldGenerator(WorldCreationSettings, DataContainer, WorldGenerator)
will be called.
The modifier can change every aspect of terrain generation using the
WorldGenerator
provided as a parameter to modifyWorldGenerator
.
This is no requirement, you can for example replace only the biome generator.
Multiple world generator modifiers can be applied on a single world.
Implementations of this interface must be registered using
GameRegistry.registerWorldGeneratorModifier(WorldGeneratorModifier)
.
Modifier and Type | Method and Description |
---|---|
String |
getId()
Gets the unique identifier of this
CatalogType . |
void |
modifyWorldGenerator(WorldCreationSettings world,
DataContainer settings,
WorldGenerator worldGenerator)
Modifies the given world generator.
|
getName
void modifyWorldGenerator(WorldCreationSettings world, DataContainer settings, WorldGenerator worldGenerator)
To replace the base chunk generator, replace the main generator
populator using
WorldGenerator.setBaseGeneratorPopulator(GeneratorPopulator)
. To
replace the biome generator, use
WorldGenerator.setBiomeGenerator(BiomeGenerator)
. To change
terrain population, modify the populator list returned by
WorldGenerator.getPopulators()
or
WorldGenerator.getGeneratorPopulators()
.
world
- The creation settings of the world.settings
- A data container with (usually) user-provided settings,
can be used by the plugin to modify the world generator.worldGenerator
- The world generator, should be modified.Additional information on the generation process
String getId()
CatalogType
. The identifier
can be formatted however needed.
This name must be something unique and may not contain spaces. The same name must be returned every time the method is invoked.
getId
in interface CatalogType