Class FabricRecipeProvider

java.lang.Object
net.minecraft.data.server.RecipeProvider
net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider
All Implemented Interfaces:
net.minecraft.data.DataProvider
Direct Known Subclasses:
FabricRecipesProvider

public abstract class FabricRecipeProvider extends net.minecraft.data.server.RecipeProvider
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final FabricDataGenerator
     

    Fields inherited from interface net.minecraft.data.DataProvider

    SHA1
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    generateRecipes(Consumer<net.minecraft.data.server.recipe.RecipeJsonProvider> exporter)
    Implement this method and then use the range of methods in RecipeProvider or from one of the recipe json factories such as ShapedRecipeJsonBuilder & ShapelessRecipeJsonBuilder.
    protected net.minecraft.util.Identifier
    getRecipeIdentifier(net.minecraft.util.Identifier identifier)
    Override this method to change the recipe identifier.
    void
    run(net.minecraft.data.DataCache cache)
     
    protected Consumer<net.minecraft.data.server.recipe.RecipeJsonProvider>
    withConditions(Consumer<net.minecraft.data.server.recipe.RecipeJsonProvider> exporter, ConditionJsonProvider... conditions)
    Return a new exporter that applies the specified conditions to any recipe json provider it receives.

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

    createChiseledBlockRecipe, createCondensingRecipe, createCutCopperRecipe, getName, getWallRecipe, offerCandleDyeingRecipe, offerChiseledBlockRecipe, offerCutCopperRecipe, offerPolishedStoneRecipe, offerWallRecipe

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • generateRecipes

      protected abstract void generateRecipes(Consumer<net.minecraft.data.server.recipe.RecipeJsonProvider> exporter)
      Implement this method and then use the range of methods in RecipeProvider or from one of the recipe json factories such as ShapedRecipeJsonBuilder & ShapelessRecipeJsonBuilder.
    • withConditions

      protected Consumer<net.minecraft.data.server.recipe.RecipeJsonProvider> withConditions(Consumer<net.minecraft.data.server.recipe.RecipeJsonProvider> exporter, ConditionJsonProvider... conditions)
      Return a new exporter that applies the specified conditions to any recipe json provider it receives.
    • run

      public void run(net.minecraft.data.DataCache cache)
      Specified by:
      run in interface net.minecraft.data.DataProvider
      Overrides:
      run in class net.minecraft.data.server.RecipeProvider
    • getRecipeIdentifier

      protected net.minecraft.util.Identifier getRecipeIdentifier(net.minecraft.util.Identifier identifier)
      Override this method to change the recipe identifier. The default implementation normalizes the namespace to the mod ID.