001    package org.bukkit.generator;
002    
003    import java.util.Random;
004    import org.bukkit.Chunk;
005    import org.bukkit.World;
006    
007    /**
008     * A block populator is responsible for generating a small area of blocks.
009     * <p>
010     * For example, generating glowstone inside the nether or generating dungeons
011     * full of treasure
012     */
013    public abstract class BlockPopulator {
014    
015        /**
016         * Populates an area of blocks at or around the given chunk.
017         * <p>
018         * The chunks on each side of the specified chunk must already exist; that
019         * is, there must be one north, east, south and west of the specified
020         * chunk. The "corner" chunks may not exist, in which scenario the
021         * populator should record any changes required for those chunks and
022         * perform the changes when they are ready.
023         *
024         * @param world The world to generate in
025         * @param random The random generator to use
026         * @param source The chunk to generate for
027         */
028        public abstract void populate(World world, Random random, Chunk source);
029    }