A ‐ Notes on ZenScript integration - Alecsioo/MMCE-Addons GitHub Wiki
Most requirements introduced by this addon can be specified through ZenScript—except for meteor requirements. I could go over all the ways you can define a requirement in ZS, but it's probably better if I teach you how to read the AddonsPrimer class instead.
You'll probably start your script by importing RecipeBuilder and creating an instance of it:
import mods.modularmachinery.RecipeBuilder;
val builder = RecipeBuilder.newBuilder("someUniqueRecipeName", "someMachineRegistryName", recipeTime);
To find all the possible methods you can use, navigate to the AddonsPrimer class. There, you’ll likely see what looks like a bunch of Java gibberish. Don’t worry—I’ll help you translate some of that Java gibberish into slightly more cryptic ZS gibberish!
Given any @ZenMethod signature like the following:
public static RecipePrimer addRadiationInput(RecipePrimer primer, int chunkRange, int amount)
In ZenScript, it becomes:
import mods.modularmachinery.RecipeBuilder;
val builder = RecipeBuilder.newBuilder("someUniqueRecipeName", "someMachineRegistryName", recipeTime);
builder.addRadiationInput(1, 1000); // Adds an input requirement of 1000 radiation in a chunk range of 1
Basically, the method name remains the same as in Java, and you include all the parameters except for the primer.
Got it? Great! You're now ready to explore all the available methods and their overloads—hopefully, they’ll cover all your requirement needs!