private void InitChunk() { BlockType ctype = BlockType.Air; biome = Biome.GetBiomeByBiomeNoise(Biome.BiomeNoise(chunkPosition.x / chunkSize, chunkPosition.z / chunkSize, 0.32f, 0.45f, 2)); BiomeData biomeData = Biome.GetBiomeData(biome); fastNoise.SetFrequency(biomeData.Frequency); fastNoise.SetFractalOctaves(biomeData.Octave); fastNoise.SetFractalLacunarity(biomeData.Lacunarity); fastNoise.SetGradientPerturbAmp(biomeData.Amplitude); fastNoise.SetSeed(WorldHandler.instance.GetSeed()); Vector3 voxelPos = new Vector3(); for (int x = 0; x < chunkSize; x++) { for (int z = 0; z < chunkSize; z++) { for (int y = 0; y < chunkSize; y++) { ctype = BlockType.Air; SetRelief(ref ctype, x, y, z); voxelPos.Set(chunkPosition.x + x, chunkPosition.y + y, chunkPosition.z + z); chunkVoxels[voxelPos] = new Block(ctype); } } } }