Create Depoloyer Application
Link to create-depoloyer-application
The Depoloyer Application mechanic is a type of IRecipeManager and implements all the methods that are available to IRecipeManager's, such as removeRecipe()
and removeAll()
.
Methods
Link to methods
Add Recipe
Link to add-recipe
The following script will add a recipe that will create Dirt when Glass is deployed.
ZenScript Copy// <recipetype:create:deploying>.addRecipe(String name, IIngredient processedItem, IIngredient heldItem, MCWeightedItemStack[] outputs)
<recipetype:create:deploying>.addRecipe("deploy_test", <item:minecraft:glass>, <item:minecraft:air>, [<item:minecraft:dirt>]);
Register Recipe using a ProcessingRecipeBuilder
Link to register-recipe-using-a-processingrecipebuilder
The following script will register a deployer recipe that will output Dirt, Diamond and Glass, requiring a Stick and Apple as inputs.
Check out Processing Recipe Builder for more information on what you can do with this method.
ZenScript Copy<recipetype:create:deploying>.registerRecipe("dep_test", (rb) => {
rb.output(<item:minecraft:dirt>);
rb.output(<item:minecraft:diamond>);
rb.output(<item:minecraft:glass>);
rb.require(<item:minecraft:stick>);
rb.require(<item:minecraft:apple>);
});
Remove Recipe
Link to remove-recipe
Deployer recipes can be removed via their name, unfortunately Create doesn't ship any default Deployer recipes to remove, so the following script is commented out as it won't actually do anything.
ZenScript Copy// <recipetype:create:deploying>.removeByName(String name);
// <recipetype:create:deploying>.removeByName("name_here");
Get a Processing Recipe Factory
Link to get-a-processing-recipe-factory
You can get a ProcessingRecipeFactory of this recipe type like so:
ZenScript Copy// <recipetype:create:deploying>.factory() as ProcessingRecipeFactory
<recipetype:create:deploying>.factory()