Package com.plotsquared.core.generator
Class IndependentPlotGenerator
java.lang.Object
com.plotsquared.core.generator.IndependentPlotGenerator
- Direct Known Subclasses:
HybridGen,SingleWorldGenerator
This class allows for implementation independent world generation.
- Sponge/Bukkit API
Use the specify method to get the generator for that platform.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidgenerateChunk(ZeroedDelegateScopedQueueCoordinator result, PlotArea settings, boolean biomes) Generate chunk block dataabstract BiomeTypeGet the biome to be generated at a specific pointabstract StringgetName()Get the name of this generator.abstract PlotAreagetNewPlotArea(String world, String id, PlotId min, PlotId max) Return a new PlotArea object.abstract voidinitialize(PlotArea area) It is preferred for the PlotArea object to do most of the initialization necessary.voidpopulateChunk(ZeroedDelegateScopedQueueCoordinator result, PlotArea setting) Populate a chunk-queue with tile entities, entities, etc.voidprocessAreaSetup(PlotAreaBuilder builder) If any additional setup options need to be changed before world creation.<T> GeneratorWrapper<T>Get the generator for your specific implementation (bukkit/sponge).
- e.g.toString()
-
Constructor Details
-
IndependentPlotGenerator
public IndependentPlotGenerator()
-
-
Method Details
-
getName
Get the name of this generator.- Returns:
- generator name
-
generateChunk
public abstract void generateChunk(ZeroedDelegateScopedQueueCoordinator result, PlotArea settings, boolean biomes) Generate chunk block data- Parameters:
result- Queue to write tosettings- PlotArea (settings)biomes- If biomes should be generated- Since:
- 7.0.0
-
populateChunk
Populate a chunk-queue with tile entities, entities, etc.- Parameters:
result- Queue to write tosetting- PlotArea (settings)- Since:
- 7.0.0
-
getNewPlotArea
Return a new PlotArea object.- Parameters:
world- world nameid- (May be null) Area namemin- Min plot id (may be null)max- Max plot id (may be null)- Returns:
- new plot area
-
processAreaSetup
If any additional setup options need to be changed before world creation. - e.g. If setup doesn't support some standard options- Parameters:
builder- the area builder to modify
-
initialize
It is preferred for the PlotArea object to do most of the initialization necessary.- Parameters:
area- area
-
specify
Get the generator for your specific implementation (bukkit/sponge).
- e.g. YourIndependentGenerator.<ChunkGenerator>specify() - Would return a ChunkGenerator object- Type Parameters:
T- world- Parameters:
world- ChunkGenerator Implementation- Returns:
- Chunk generator
-
getBiome
Get the biome to be generated at a specific point- Parameters:
settings- PlotArea settings to provide biomex- World x positiony- World y positionz- World z position- Returns:
- Biome type to be generated
- Since:
- 7.0.0
-
toString
-