Home Migration Guide Getting Started With Scripts Commands Examples
Generic JSON Recipes
This page relates to Mystical Agriculture, which has built-in support!

Mystical Agriculture Infusion Crafting

Infusion Crafting is NOT a type of IRecipeManager and normal removal methods will not work for it.

Package

You may want to import the class so you don’t need to use the full package name everywhere, to do this simply add the following to the top of your script:

script.zs
import mods.mysticalagriculture.InfusionCrafting;

Now you can reference the class like so:

script.zs
InfusionCrafting.addRecipe("test", <item:minecraft:stick> * 10, [<item:minecraft:diamond>, <tag:forge:ingots/iron>, <item:minecraft:stick>]);

Methods

The following script will add a recipe that will output 10 Sticks when a Diamond, a Stick and any Item from the Iron Ingot Tag is infused.

script.zs
// mods.mysticalagriculture.InfusionCrafting.addRecipe(id as string, output as IItemStack, inputs as IIngredient[]);
mods.mysticalagriculture.InfusionCrafting.addRecipe("test", <item:minecraft:stick> * 10, [<item:minecraft:diamond>, <tag:forge:ingots/iron>, <item:minecraft:stick>]);

The following script will remove the Infusion Crafting Recipe for Cow Seeds.

script.zs
// mods.mysticalagriculture.InfusionCrafting.remove(output as IItemStack);
mods.mysticalagriculture.InfusionCrafting.remove(<item:mysticalagriculture:cow_seeds>);