/// <summary> /// Generate the given set of blockdata at the given location offset /// </summary> /// <param name="location">The xyz to use as an offset for generating these blocks</param> /// <param name="blockData">The block data to populate</param> public void generateAllAt(Coordinate location, IBlockStorage blockData) { isoSurfaceLevel = getIsoSurfaceLevel(); Coordinate.Zero.until(blockData.bounds, (coordinate) => { BlocksGenerated++; Coordinate globalLocation = coordinate + (location * blockData.bounds); float isoSurfaceDensityValue = getNoiseValueAt(globalLocation); Block.Type newBlockType = getBlockTypeFor(isoSurfaceDensityValue); if (newBlockType != Block.Types.Air) { blockData.setBlock(coordinate, newBlockType); } }); }