package ca.recrown.islandsurvivalcraft.world.generation;

import org.bukkit.World;
import org.bukkit.block.Biome;

import ca.recrown.islandsurvivalcraft.caching.Cache;
import ca.recrown.islandsurvivalcraft.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.BiomeSelector;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMapper;

public interface BiomeGenerator {

    /**
     * Given a biome array, requests for it to be saturated by the IslandWorldChunkGenerator.
     * The array should store the columns of biomes for the entire chunk.
     * It doesn't need to be populated on the first call as this method will be called once for every column in the chunk.
     * However, if some biomes can be set without repetative calls, doing so will prevent this method from being called for those locals.
     * 
     * @param biomesArray The array of biomes that are to be saturated.
     * @param world The current world.
     * @param chunkX The X coordinate of the chunk.
     * @param chunkZ The Z coordinate of the chunk.
     * @param localX The X coordinate of the column within the chunk.
     * @param localZ The Z coordinate of the column within the chunk.
     * @param mapper The island mapper to be used.
     * @param tempGenerator The temperature generator to be used.
     * @param biomeCache Cache for biomes.
     * @param chunkGenCache Cache for whether or not the chunk is generated.
     */
    public void generateBiomeColumn(Biome[][] biomesArray, World world, int chunkX, int chunkZ, int localX, int localZ, IslandWorldMapper mapper, BiomeSelector biomeSelector, TemperatureMapGenerator tempGenerator, Cache<Point2, Biome[]> biomeCache, Cache<Point2, Boolean> chunkGenCache);
}