Pressure (PNC)
Use the pressure requirement in a KubeJS recipe.
This requirement requires Custom Machinery Pneumaticcraft to be installed.
Use one of these methods to add a pressure requirement to the recipe.
.requirePressure(min, max)
.requirePressure(min, max, volume)
.producePressure(volume)
The
min
andmax
params must be decimal values bewteen -1 and 25.The volume param must be a positive integer.
Example
The following recipe will run only if the machine's pressure is between 2bar and 3bar and will consume 100mL of compressed air.
ServerEvents.recipes(event => {
event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
.requirePressure(2, 3, 100)
})
Last updated