ProcessingRecipeBuilder
Link to 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:
- Compacting 2) Crushing 3) Cutting 4) Deployer Application 5) Emptying 6) Filling 7) Milling 8) Mixing 9) Pressing 10) Sand Paper Polishing 11) Splashing
Metodi
Link to metodi
Name: withItemIngredients
Sets the ingredients for this recipe.
ZenScript Copy// ProcessingRecipeBuilder.withItemIngredients(ingredients as IIngredient[]);
builder.withItemIngredients(<item:minecraft:dirt>, <item:minecraft:diamond>);
Name: withSingleItemOutput
Sets the output of this recipe to be a single ItemStack.
ZenScript Copy// ProcessingRecipeBuilder.withSingleItemOutput(output as IIngredient[]);
builder.withSingleItemOutput(<item:minecraft:dirt>);
Name: withItemOutputs
Sets the outputs of this recipe to be an array of Weighted ItemStacks.
ZenScript Copy// ProcessingRecipeBuilder.withItemOutputs(output as MCWeightedItemStack[]);
builder.withItemOutputs(<item:minecraft:dirt> % 50);
Name: withFluidIngredients
Sets the inputs of this recipe to be an array of CTFluidIngredient (Which accepts a MCFluidStack or a MCTag
ZenScript Copy// ProcessingRecipeBuilder.withFluidIngredients(ingredients as CTFluidIngredient[]);
builder.withFluidIngredients(<fluid:minecraft:water>, <tag:fluids:minecraft:lava>);
Name: withFluidOutputs
Sets the output of this recipe to the given MCFluidStack array.
ZenScript Copy// ProcessingRecipeBuilder.withFluidOutputs(output as MCFluidStack[]);
builder.withFluidOutputs(<fluid:minecraft:water>);
Name: duration
Sets the processing duration of this recipe.
ZenScript Copy// ProcessingRecipeBuilder.duration(ticks as int);
builder.duration(500);
Name: averageProcessingDuration
Sets the processing duration to be the average processing duration for recipes, which is 100 ticks.
ZenScript Copy// ProcessingRecipeBuilder.averageProcessingDuration(ticks as int);
builder.averageProcessingDuration(500);
Name: requiresHeat
Sets the HeatCondition of this recipe.
ZenScript Copy// ProcessingRecipeBuilder.requiresHeat(condition as HeatCondition);
builder.requiresHeat(HeatCondition.SUPERHEATED);
Name: require
Specifies that this recipe requires the given IIngredient or CTFluidIngredient. This method can be chained together to have multiple ingredients.
ZenScript Copy// ProcessingRecipeBuilder.require(ingredient as IIngredient);
builder.require(<item:minecraft:dirt>);
ZenScript Copy// ProcessingRecipeBuilder.require(ingredient as CTFluidIngredient);
builder.require(<fluid:minecraft:water>);
Name: output
Specifies that this recipe outputs the provided MCWeightedItemStack or the given MCFluidStack. This method can be chained together to have multiple outputs.
ZenScript Copy// ProcessingRecipeBuilder.output(ingredient as IIngredient);
builder.output(<item:minecraft:dirt>);
ZenScript Copy// ProcessingRecipeBuilder.output(ingredient as CTFluidIngredient);
builder.output(<fluid:minecraft:water>);