Class ProcessingRecipeGen<P extends ProcessingRecipeParams,R extends ProcessingRecipe<?,P>,B extends ProcessingRecipeBuilder<P,R,B>>

java.lang.Object
net.minecraft.data.recipes.RecipeProvider
com.simibubi.create.api.data.recipe.BaseRecipeProvider
com.simibubi.create.api.data.recipe.ProcessingRecipeGen<P,R,B>
All Implemented Interfaces:
net.minecraft.data.DataProvider
Direct Known Subclasses:
DeployingRecipeGen, ItemApplicationRecipeGen, StandardProcessingRecipeGen

public abstract class ProcessingRecipeGen<P extends ProcessingRecipeParams,R extends ProcessingRecipe<?,P>,B extends ProcessingRecipeBuilder<P,R,B>> extends BaseRecipeProvider
A base class for all processing recipes, containing helper methods for datagenning processing recipes.

Addons should usually extend StandardProcessingRecipeGen instead if the processing recipe uses the base ProcessingRecipeParams. For processing recipes that uses CUSTOM ProcessingRecipeParams like ItemApplicationRecipe, extend this class and override getRecipeType() and getBuilder(ResourceLocation), returning the corresponding recipe type and recipe builder.

  • Nested Class Summary

    Nested classes/interfaces inherited from class com.simibubi.create.api.data.recipe.BaseRecipeProvider

    BaseRecipeProvider.GeneratedRecipe

    Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider

    net.minecraft.data.DataProvider.Factory<T extends net.minecraft.data.DataProvider>
  • Field Summary

    Fields inherited from class com.simibubi.create.api.data.recipe.BaseRecipeProvider

    all, modid

    Fields inherited from class net.minecraft.data.recipes.RecipeProvider

    advancementPathProvider, recipePathProvider

    Fields inherited from interface net.minecraft.data.DataProvider

    FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR, LOGGER
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcessingRecipeGen(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, String defaultNamespace)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String namespace, Supplier<net.minecraft.world.level.ItemLike> singleIngredient, UnaryOperator<B> transform)
    Create a processing recipe with a single itemstack ingredient, using its id as the name of the recipe
    create(String name, UnaryOperator<B> transform)
    Create a new processing recipe, with recipe definitions provided by the function, under the default namespace
    create(Supplier<net.minecraft.world.level.ItemLike> singleIngredient, UnaryOperator<B> transform)
    Create a processing recipe with a single itemstack ingredient, using its id as the name of the recipe
    create(net.minecraft.resources.ResourceLocation name, UnaryOperator<B> transform)
    Create a new processing recipe, with recipe definitions provided by the function
    createWithDeferredId(Supplier<net.minecraft.resources.ResourceLocation> name, UnaryOperator<B> transform)
     
    protected abstract B
    getBuilder(net.minecraft.resources.ResourceLocation id)
     
    @NotNull String
    Gets a display name for this recipe generator.
    protected abstract IRecipeTypeInfo
     
    protected Supplier<net.minecraft.resources.ResourceLocation>
    idWithSuffix(Supplier<net.minecraft.world.level.ItemLike> item, String suffix)
     

    Methods inherited from class com.simibubi.create.api.data.recipe.BaseRecipeProvider

    asResource, buildRecipes, register

    Methods inherited from class net.minecraft.data.recipes.RecipeProvider

    banner, bedFromPlanksAndWool, buildAdvancement, buildAdvancement, buildRecipes, buttonBuilder, candle, carpet, chestBoat, chiseled, chiseledBuilder, colorBlockWithDye, coloredTerracottaFromTerracottaAndDye, concretePowder, cookRecipes, copperBulb, copySmithingTemplate, copySmithingTemplate, copySmithingTemplate, cut, cutBuilder, doorBuilder, fenceBuilder, fenceGateBuilder, generateForEnabledBlockFamilies, generateRecipes, getBaseBlock, getBlastingRecipeName, getConversionRecipeName, getHasName, getItemName, getSimpleRecipeName, getSmeltingRecipeName, grate, hangingSign, has, has, has, insideOf, inventoryTrigger, inventoryTrigger, mosaicBuilder, netheriteSmithing, nineBlockStorageRecipes, nineBlockStorageRecipes, nineBlockStorageRecipesRecipesWithCustomUnpacking, nineBlockStorageRecipesWithCustomPacking, oneToOneConversionRecipe, oneToOneConversionRecipe, oreBlasting, oreCooking, oreSmelting, planksFromLog, planksFromLogs, polished, polishedBuilder, pressurePlate, pressurePlateBuilder, run, run, signBuilder, simpleCookingRecipe, slab, slabBuilder, smeltingResultFromBase, stainedGlassFromGlassAndDye, stainedGlassPaneFromGlassPaneAndDye, stainedGlassPaneFromStainedGlass, stairBuilder, stonecutterResultFromBase, stonecutterResultFromBase, threeByThreePacker, threeByThreePacker, trapdoorBuilder, trimSmithing, twoByTwoPacker, wall, wallBuilder, waxRecipes, woodenBoat, woodFromLogs

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProcessingRecipeGen

      public ProcessingRecipeGen(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, String defaultNamespace)
  • Method Details

    • create

      protected BaseRecipeProvider.GeneratedRecipe create(String namespace, Supplier<net.minecraft.world.level.ItemLike> singleIngredient, UnaryOperator<B> transform)
      Create a processing recipe with a single itemstack ingredient, using its id as the name of the recipe
    • create

      protected BaseRecipeProvider.GeneratedRecipe create(Supplier<net.minecraft.world.level.ItemLike> singleIngredient, UnaryOperator<B> transform)
      Create a processing recipe with a single itemstack ingredient, using its id as the name of the recipe
    • createWithDeferredId

      protected BaseRecipeProvider.GeneratedRecipe createWithDeferredId(Supplier<net.minecraft.resources.ResourceLocation> name, UnaryOperator<B> transform)
    • create

      protected BaseRecipeProvider.GeneratedRecipe create(net.minecraft.resources.ResourceLocation name, UnaryOperator<B> transform)
      Create a new processing recipe, with recipe definitions provided by the function
    • create

      protected BaseRecipeProvider.GeneratedRecipe create(String name, UnaryOperator<B> transform)
      Create a new processing recipe, with recipe definitions provided by the function, under the default namespace
    • getRecipeType

      protected abstract IRecipeTypeInfo getRecipeType()
    • getBuilder

      protected abstract B getBuilder(net.minecraft.resources.ResourceLocation id)
    • idWithSuffix

      protected Supplier<net.minecraft.resources.ResourceLocation> idWithSuffix(Supplier<net.minecraft.world.level.ItemLike> item, String suffix)
    • getName

      @NotNull public @NotNull String getName()
      Gets a display name for this recipe generator. It is recommended to override this for a prettier name, however that is not required.
      Specified by:
      getName in interface net.minecraft.data.DataProvider
      Overrides:
      getName in class net.minecraft.data.recipes.RecipeProvider