---
description: Use the heat or temperature requirements in a KubeJS recipe.
---

# Heat (Mekanism)

{% 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**](../../../recipes/requirements/heat-mekanism) **or** [**temperature requirement**](../../../recipes/requirements/temperature-requirement-mekanism) **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](../../../misc/range).
* 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)
  
})
```
