package ca.recrown.islandsurvivalcraft.utilities.biomes;

import org.bukkit.block.Biome;

public class OceanBiomeInfo implements BiomeInfo {
    private final Biome ocean;
    private final Biome transitionOcean;
    private final Biome deepAlternative;
    
    public OceanBiomeInfo(Biome ocean, Biome transitionOcean, Biome deepAlternative) {
        if (ocean == null || deepAlternative == null) throw new IllegalArgumentException("Neither argument ocean nor deepAlternative may be null.");
        this.ocean = ocean;
        this.transitionOcean = transitionOcean;
        this.deepAlternative = deepAlternative;
    }
    
    /**
     * @return the main ocean.
     */
    public Biome getOcean() {
        return ocean;
    }

    /**
     * @return the transition ocean. Will return the normal biome if no transitional biome is designated.
     */
    public Biome getTransitionOcean() {
        if (transitionOcean == null) return getOcean();
        return transitionOcean;
    }

    /**
     * @return the deep version of this ocean.
     */
    public Biome getDeepAlternative() {
        return deepAlternative;
    }

    @Override
    public Biome getMainBiome() {
        return getOcean();
    }

    @Override
    public Biome getTransitionBiome() {
        return getTransitionBiome();
    }
}