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

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

    JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR
  • 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 invalid input: '&' 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.DataWriter writer)
     
    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 invalid input: '&' 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.DataWriter writer)
      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.