Modular Machinery

Modular Machinery

12M Downloads

how to use the command while recipes finished

TRLWeiss opened this issue ยท 0 comments

commented

I noticed there were some scripts about using commands, just like finishCommands, startCommands or something. but i have no idea how to use that. There's no usage in wiki or document at all, so I wonder if these codes work.
Here's what i tried. The script can be loaded correctly, but is doesn't function.

{
    "machine": "alloy_furnace",
    "registryName": "alloy_furnace_diamond",
    "recipeTime": 5,
    "requirements": [
        
        {
            "type": "modularmachinery:item",
            "io-type": "output",
            "item": "minecraft:diamond",
            "amount": 1
        },
        {
            "type": "modularmachinery:item",
            "io-type": "input",
            "item": "minecraft:coal",
            "amount": 32
        },
        {
            "type": "modularmachinery:item",
            "io-type": "input",
            "item": "minecraft:tnt",
            "amount": 8
        }
    ],
	"commands": "/effect @p 16 1000",
	"command": "/effect @p 16 1000",
	"finishCommands": ["/effect @p 16 1000","/effect @p 17 1000"],
	"finishCommands": ["/effect @p 16 1000",-1],
	"finishCommands": [
		{
			"command": "/effect @p 16 1000",
			"interval": -1
		}	
	]
}