Button
Use the button requirement in a KubeJS recipe
Use one of these methods to add a Button Requirement to the recipe.
.requireButtonPressed("id")
.requireButtonReleased("id")
The
id
param must be a string that define which button element need to be pressed to start the recipe.
Example
This recipe will produce 10FE each time the player press the button :
onEvent('recipes', event => {
event.recipes.custommachinery.custom_machine("custommachinery:dynamo", 1)
.requireButtonPressed("button")
.produceFE(10)
})
Last updated