Contraption (Create)

Use the contraption requirement in a KubeJS recipe

This requirement requires Custom Machinery Create to be installed.

Use one of these methods to add a contraption requirement to the recipe.

.requireSU(speed)
.requireSU(speed, stressImpact)

.requireScalingSU(speed)
.requireScalingSU(speed, stressImpact)

.produceSU(speed)
.produceSU(speed, stressCapacity)
  • The speed, stressImpact and stressCapacity params must be a positive decimal value.

  • The scaling methods will make the recipe processing speed scale with the speed provided to the machine.

Example

This recipe require at least 64rpm to start and add a stress impact of 2 times its speed to the network :

ServerEvents.recipes(event => {

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireSU(64, 2)
})

Last updated