Button

Use the button requirement in a CT 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 :

<recipetype:custommachinery:custom_machine>.create("custommachinery:dynamo", 1)
.requireButtonPressed("button")
.produceEnergy(10)
.build();