use of com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder in project Create by Creators-of-Create.
the class SequencedAssemblyRecipeBuilder method addStep.
public <T extends ProcessingRecipe<?>> SequencedAssemblyRecipeBuilder addStep(ProcessingRecipeFactory<T> factory, UnaryOperator<ProcessingRecipeBuilder<T>> builder) {
ProcessingRecipeBuilder<T> recipeBuilder = new ProcessingRecipeBuilder<>(factory, new ResourceLocation("dummy"));
Item placeHolder = recipe.getTransitionalItem().getItem();
recipe.getSequence().add(new SequencedRecipe<>(builder.apply(recipeBuilder.require(placeHolder).output(placeHolder)).build()));
return this;
}
use of com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder in project Create by Creators-of-Create.
the class ProcessingRecipeGen method create.
/**
* Create a processing recipe with a single itemstack ingredient, using its id
* as the name of the recipe
*/
protected <T extends ProcessingRecipe<?>> GeneratedRecipe create(String namespace, Supplier<ItemLike> singleIngredient, UnaryOperator<ProcessingRecipeBuilder<T>> transform) {
ProcessingRecipeSerializer<T> serializer = getSerializer();
GeneratedRecipe generatedRecipe = c -> {
ItemLike iItemProvider = singleIngredient.get();
transform.apply(new ProcessingRecipeBuilder<>(serializer.getFactory(), new ResourceLocation(namespace, iItemProvider.asItem().getRegistryName().getPath())).withItemIngredients(Ingredient.of(iItemProvider))).build(c);
};
all.add(generatedRecipe);
return generatedRecipe;
}
Aggregations