    001    package net.minecraft.world.chunk;
    002
    003    import java.util.List;
    004    import net.minecraft.entity.EnumCreatureType;
    005    import net.minecraft.util.IProgressUpdate;
    006    import net.minecraft.world.ChunkPosition;
    007    import net.minecraft.world.World;
    008
    009    public interface IChunkProvider
    010    {
    011        /**
    012         * Checks to see if a chunk exists at x, y
    013         */
    014        boolean chunkExists(int var1, int var2);
    015
    016        /**
    017         * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
    018         * specified chunk from the map seed and chunk seed
    019         */
    020        Chunk provideChunk(int var1, int var2);
    021
    022        /**
    023         * loads or generates the chunk at the chunk location specified
    024         */
    025        Chunk loadChunk(int var1, int var2);
    026
    027        /**
    028         * Populates chunk with ores etc etc
    029         */
    030        void populate(IChunkProvider var1, int var2, int var3);
    031
    032        /**
    033         * Two modes of operation: if passed true, save all Chunks in one go.  If passed false, save up to two chunks.
    034         * Return true if all chunks have been saved.
    035         */
    036        boolean saveChunks(boolean var1, IProgressUpdate var2);
    037
    038        /**
    039         * Unloads the 100 oldest chunks from memory, due to a bug with chunkSet.add() never being called it thinks the list
    040         * is always empty and will not remove any chunks.
    041         */
    042        boolean unload100OldestChunks();
    043
    044        /**
    045         * Returns if the IChunkProvider supports saving.
    046         */
    047        boolean canSave();
    048
    049        /**
    050         * Converts the instance data to a readable string.
    051         */
    052        String makeString();
    053
    054        /**
    055         * Returns a list of creatures of the specified type that can spawn at the given location.
    056         */
    057        List getPossibleCreatures(EnumCreatureType var1, int var2, int var3, int var4);
    058
    059        /**
    060         * Returns the location of the closest structure of the specified type. If not found returns null.
    061         */
    062        ChunkPosition findClosestStructure(World var1, String var2, int var3, int var4, int var5);
    063
    064        int getLoadedChunkCount();
    065
    066        void recreateStructures(int var1, int var2);
    067    }