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

ProcessingRecipeBuilder

The ProcessingRecipeBuilder is a builder object which allows you to register some recipes using a builder like pattern instead of a single method call.

You can register recipes using this object by calling the registerRecipe(name as string, recipeBuilder as Consumer<ProcessingRecipeBuilder>) method in the following recipe types:

  1. Compacting
  2. Crushing
  3. Cutting
  4. Deployer Application
  5. Emptying
  6. Filling
  7. Milling
  8. Mixing
  9. Pressing
  10. Sand Paper Polishing
  11. Splashing

Methods

Sets the ingredients for this recipe.

script.zs
// ProcessingRecipeBuilder.withItemIngredients(ingredients as IIngredient[]);
builder.withItemIngredients(<item:minecraft:dirt>, <item:minecraft:diamond>);

Sets the output of this recipe to be a single ItemStack.

script.zs
// ProcessingRecipeBuilder.withSingleItemOutput(output as IIngredient[]);
builder.withSingleItemOutput(<item:minecraft:dirt>);

Sets the outputs of this recipe to be an array of Weighted ItemStacks.

script.zs
// ProcessingRecipeBuilder.withItemOutputs(output as MCWeightedItemStack[]);
builder.withItemOutputs(<item:minecraft:dirt> % 50);

Sets the inputs of this recipe to be an array of CTFluidIngredient (Which accepts a MCFluidStack or a MCTag).

script.zs
// ProcessingRecipeBuilder.withFluidIngredients(ingredients as CTFluidIngredient[]);
builder.withFluidIngredients(<fluid:minecraft:water>, <tag:fluids:minecraft:lava>);

Sets the output of this recipe to the given MCFluidStack array.

script.zs
// ProcessingRecipeBuilder.withFluidOutputs(output as MCFluidStack[]);
builder.withFluidOutputs(<fluid:minecraft:water>);

Sets the processing duration of this recipe.

script.zs
// ProcessingRecipeBuilder.duration(ticks as int);
builder.duration(500);

Sets the processing duration to be the average processing duration for recipes, which is 100 ticks.

script.zs
// ProcessingRecipeBuilder.averageProcessingDuration(ticks as int);
builder.averageProcessingDuration(500);

Sets the HeatCondition of this recipe.

script.zs
// ProcessingRecipeBuilder.requiresHeat(condition as HeatCondition);
builder.requiresHeat(HeatCondition.SUPERHEATED);

Specifies that this recipe requires the given IIngredient or CTFluidIngredient. This method can be chained together to have multiple ingredients.

script.zs
// ProcessingRecipeBuilder.require(ingredient as IIngredient);
builder.require(<item:minecraft:dirt>);
script.zs
// ProcessingRecipeBuilder.require(ingredient as CTFluidIngredient);
builder.require(<fluid:minecraft:water>);

Specifies that this recipe outputs the provided MCWeightedItemStack or the given MCFluidStack. This method can be chained together to have multiple outputs.

script.zs
// ProcessingRecipeBuilder.output(ingredient as IIngredient);
builder.output(<item:minecraft:dirt>);
script.zs
// ProcessingRecipeBuilder.output(ingredient as CTFluidIngredient);
builder.output(<fluid:minecraft:water>);