#include "GrasslandBiom.h" #include "BlockType.h" #include "BasicBlocks.h" #include "FastNoiseLite.h" #include "FastNoiseWrapper.h" GrasslandBiom::GrasslandBiom() : BiomGenerator() { heightNoise = 0; } GrasslandBiom::~GrasslandBiom() { if( heightNoise ) heightNoise->release(); } Framework::Either GrasslandBiom::getBlock( int x, int y, int z ) { return DirtBlockType::ID; } Noise* GrasslandBiom::zHeightMapNoise( int seed ) { if( heightNoise ) return heightNoise; FastNoiseLite* noise = new FastNoiseLite( seed ); noise->SetNoiseType( FastNoiseLite::NoiseType::NoiseType_ValueCubic ); heightNoise = new FastNoiseWrapper( noise, seed ); return heightNoise; }