> For the complete documentation index, see [llms.txt](https://frinn.gitbook.io/custom-machinery-1.21/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://frinn.gitbook.io/custom-machinery-1.21/mod-integrations/kubejs/recipes/light.md).

# Light

Use the light requirement in a KubeJS recipe

**Use one of these methods to add a** [**Light Requirement**](https://github.com/Frinn38/Custom-Machinery/wiki/Light-Requirement) **to the recipe.**

```javascript
.requireSkyLight(amount)
.requireSkyLight("range")

.requireBlockLight(amount)
.requireBlockLight("range")
```

* The `amount` param must be a positive integer between 0 and 15.
* The `range` param must be a string defining a valid [Range](/custom-machinery-1.21/misc/range.md).&#x20;

### Examples

```javascript
ServerEvents.recipes(event => {

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireSkyLight(15)
  
  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireBlockLight("[7,)")
  
})
```
