# Light

Light requirement is used to check the sky or block light level at the machine position.

This requirement is INPUT only, you don't have to specify a `mode` property.&#x20;

This requirement will block the start of the recipe if the required light level is not met, but it will never consume or produce anything.

The requirement type of light requirement is : `"custommachinery:light"`.

### Properties

The light requirement has 2 mandatory properties and 1 optional property.

#### Mandatory properties

```json
"type": "custommachinery:light" //Mandatory to define a light requirement.
```

<details>

<summary>Light</summary>

#### Name : `light`

#### Description :&#x20;

A [Range](https://frinn.gitbook.io/custom-machinery-1.18/misc/range) that define the valid light level the machine need to process the recipe.

#### Example :&#x20;

```json
"light": "8"
```

Require a light level of 8.

</details>

#### Optional properties

<details>

<summary>Sky</summary>

#### Name : `sky`

#### Description :&#x20;

A boolean, if true the requirement will check the sky light level, if false it will check the block light level.

The maximum sky light level the machine can see is 14.

#### Default : `false`

Check the block light level.

#### Example :&#x20;

```json
"sky": true
```

The machine will check the sky light level.

</details>

### Example

A light requirement that will make the recipe start only if the sky light level is below 7 :

```json
{
    "type": "custommachinery:light",
    "light": "(,7)",
    "sky": true
}
```
