Button

Make the recipe start only if a button is pressed on the machine gui.

Button requirement is used to make the custom machine recipe start only when the player press a button in the machine gui.

The button requirement is an input only requirement, meaning that you don't have to define the mode property.

The type of button requirement is : "custommachinery:button".

Properties

The button requirement has 2 mandatory properties and 1 optional property.

Mandatory properties

"type": "custommachinery:button" //Mandatory to define a button requirement.
Id

Name : id

Description :

The string id of the button element that must be pressed.

Example :

The recipe will start only if the button with id button1 is pressed by the player.

"id": "button1"

Optional property

Inverse

Name : inverse

Description :

A boolean that will make the recipe require the button to not be pressed.

Default : false

Example :

The recipe will start if the button is not pressed :

"inverse": true

Example

A button requirement that will make the recipe start only if the button element with id diamond is pressed by the player :

{
    "type": "button",
    "id": "diamond"
}

Last updated