> 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/heat-mekanism.md).

# Heat (Mekanism)

Use the heat or temperature requirements in a KubeJS recipe.

{% hint style="warning" %}
This requirement requires [Custom Machinery Mekanism](https://www.curseforge.com/minecraft/mc-mods/custom-machinery-mekanism) to be installed.
{% endhint %}

**Use one of these methods to add a** [**heat requirement**](/custom-machinery-1.21/recipes/requirements/heat-mekanism.md) **or** [**temperature requirement**](/custom-machinery-1.21/recipes/requirements/temperature-mekanism.md) **to the recipe.**

```javascript
.requireHeat(amount)
.requireHeatPerTick(amount)

.produceHeat(amount)
.produceHeatPerTick(amount)

.requireTemp(range, "unit")
.requireTempKelvin(range)
.requireTempCelsius(range)
.requireTempFahrenheit(range)
.requireTempRankine(range)
.requireTempAmbient(range)
```

* The `amount` param must be a positive integer.
* The `range` param must be a valid [Range](/custom-machinery-1.21/misc/range.md).
* The `"unit"` param must be a valid temperature unit, valid values are : `kelvin`, `celsius`, `fahrenheit`, `rankine` and `ambient`. It is recommended to use the specific methods for each unit thought.

### Example

The following recipe will run only if the machine temperature is above 100°C and will produce 1000 heat.

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

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireTempCelsius("(100,)")
  .produceHeat(1000)
  
})
```
