Command
Make the recipe process a command
Command requirement is used to make the custom machine execute commands while crafting.
This requirement doesn't have a mode and will not stop the processing of a recipe even if the command fail.
The command can be executed at the start, at the end or every tick of the crafting process (see the phase
property below).
The requirement type of command requirement is : "custommachinery:command"
.
Properties
The command requirement has 3 mandatory properties and 4 optional properties.
Mandatory properties
"type": "custommachinery:command" //Mandatory to define a command requirement.
Optional properties
Example
A Command Requirement that will spawn a Zombie when the recipe finish with 50% chance:
{
"type": "custommachinery:command",
"command": "/summon minecraft:zombie",
"phase": "ending",
"permission": 4,
"chance": 0.5
}
Last updated