Heat (Mekanism)

Use the heat or temperature requirements in a KubeJS recipe.

This requirement requires Custom Machinery Mekanism to be installed.

Use one of these methods to add a heat requirement or temperature requirement to the recipe.

.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.

  • 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.

ServerEvents.recipes(event => {

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