#include <WorldGenerator/SurvivalWorldGenerator/SurvivalWorldGenerator.hpp>
#include <World/LocalWorld/LocalWorld.hpp>
#include <Perlin2D/Perlin2D.hpp>

SurvivalWorldGenerator::SurvivalWorldGenerator(LocalWorld &world, uint64_t seed) :
    world(world),
    worldGenNode(seed),
    terrain(*this),
    underground(*this),
    tunnels(*this),
    decorations(*this),
    mantle(*this)
{}

LocalWorld& SurvivalWorldGenerator::getWorld()
{
    return world;
}

GeneratorNode& SurvivalWorldGenerator::getRootNode()
{
    return worldGenNode;
}

void SurvivalWorldGenerator::generateChunk(Chunk &chunk)
{
    terrain.generate(chunk);
    underground.generate(chunk);
    tunnels.generate(chunk);
    decorations.generate(chunk);
    mantle.generate(chunk);
}

GeneratorNode SurvivalWorldGenerator::getWeatherGenNode()
{
    return worldGenNode(0x235e9e22a3f50f40);
}