Energy

Use the energy requirement in a KubeJS recipe

Use one of these methods to add an Energy Requirement to the recipe.

.requireEnergy(amount)

.requireEnergyPerTick(amount)

.produceEnergy(amount)

.produceEnergyPerTick(amount)
  • The amount param must be a positive integer.

Example

The following recipe will consume 1000FE.

ServerEvents.recipes(event => {

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