diff --git a/paper-api/src/main/java/org/bukkit/generator/ChunkGenerator.java b/paper-api/src/main/java/org/bukkit/generator/ChunkGenerator.java index 5b847bb387..70f20fb64f 100644 --- a/paper-api/src/main/java/org/bukkit/generator/ChunkGenerator.java +++ b/paper-api/src/main/java/org/bukkit/generator/ChunkGenerator.java @@ -24,8 +24,13 @@ import org.jetbrains.annotations.Nullable; * at a time, although this may not necessarily be the main server thread. * * If your generator is capable of fully asynchronous generation, then - * {@link #isParallelCapable()} should be overriden accordingly to allow + * {@link #isParallelCapable()} should be overridden accordingly to allow * multiple concurrent callers. + * + * Some aspects of world generation can be delegated to the Vanilla generator. + * The methods {@link ChunkGenerator#shouldGenerateCaves()}, {@link ChunkGenerator#shouldGenerateDecorations()}, + * {@link ChunkGenerator#shouldGenerateMobs()} and {@link ChunkGenerator#shouldGenerateStructures()} can be + * overridden to enable this. */ public abstract class ChunkGenerator { @@ -182,6 +187,46 @@ public abstract class ChunkGenerator { return false; } + /** + * Gets if the server should generate Vanilla caves after this + * ChunkGenerator. + * + * @return true if the server should generate Vanilla caves + */ + public boolean shouldGenerateCaves() { + return false; + } + + /** + * Gets if the server should generate Vanilla decorations after this + * ChunkGenerator. + * + * @return true if the server should generate Vanilla decorations + */ + public boolean shouldGenerateDecorations() { + return false; + } + + /** + * Gets if the server should generate Vanilla mobs after this + * ChunkGenerator. + * + * @return true if the server should generate Vanilla mobs + */ + public boolean shouldGenerateMobs() { + return false; + } + + /** + * Gets if the server should generate Vanilla structures after this + * ChunkGenerator. + * + * @return true if the server should generate Vanilla structures + */ + public boolean shouldGenerateStructures() { + return false; + } + /** * Data for a Chunk. */