package ca.recrown.islandsurvivalcraft.world.generation.biomes;

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

import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.BiomeMap;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import ca.recrown.islandsurvivalcraft.world.TemperatureMap;

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 chunkBiomeSets The array of biomes that are to be saturated. First two arrays represent the x and y values, and the third represents the biome set.
     * @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[][][] chunkBiomeSets, World world, int chunkX, int chunkZ, int localX, int localZ, IslandWorldMap mapper, BiomeMap biomeSelector, TemperatureMap tempGenerator, Cache<Point2, Biome[]> biomeCache, Cache<Point2, Boolean> chunkGenCache);
}