Home Migration Guide Getting Started With Scripts Commands Examples
Generic JSON Recipes
This page relates to Create, which does not have built-in support, you will need to install CreateTweaker as well

Create Crushing

The Crushing mechanic is a type of IRecipeManager and implements all the methods that are available to IRecipeManager’s, such as removeRecipe() and removeAll().

Methods

Add Recipe

The following script will add a recipe that will output a Diamond 10% of the time when a piece of Dirt is crushed with a duration of 100.

script.zs
// <recipetype:create:crushing>.addRecipe(String name, MCWeightedItemStack[] output, IIngredient input, @Optional(100) int duration)
<recipetype:create:crushing>.addRecipe("hopes_and_dreams", [<item:minecraft:diamond> % 10], <item:minecraft:dirt>);

Remove Recipes

The following script will remove all Crushing recipes that output a Crushed Zinc Ore.

script.zs
// <recipetype:create:crushing>.removeRecipe(IItemStack output)
<recipetype:create:crushing>.removeRecipe(<item:create:crushed_zinc_ore>);