Class FabricRecipeProvider
java.lang.Object
net.minecraft.data.server.recipe.RecipeProvider
net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider
- All Implemented Interfaces:
DataProvider
Extend this class and implement
generate(net.minecraft.data.server.recipe.RecipeExporter)
.
Register an instance of the class with FabricDataGenerator.Pack.addProvider(net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator.Pack.Factory<T>)
in a DataGeneratorEntrypoint
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
Fields inherited from interface net.minecraft.data.DataProvider
JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR, LOGGER
-
Constructor Summary
ConstructorDescriptionFabricRecipeProvider
(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
generate
(RecipeExporter exporter) Implement this method and then use the range of methods inRecipeProvider
or from one of the recipe json factories such asShapedRecipeJsonBuilder
orShapelessRecipeJsonBuilder
.protected Identifier
getRecipeIdentifier
(Identifier identifier) Override this method to change the recipe identifier.run
(DataWriter writer, RegistryWrapper.WrapperLookup wrapperLookup) protected RecipeExporter
withConditions
(RecipeExporter exporter, ResourceCondition... 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.recipe.RecipeProvider
conditionsFromItem, conditionsFromTag, convertBetween, createChiseledBlockRecipe, createDoorRecipe, createSlabRecipe, createStairsRecipe, createTrapdoorRecipe, generateCookingRecipes, generateFamilies, generateFamily, getBlastingItemPath, getItemPath, getName, getRecipeName, getSmeltingItemPath, hasItem, offer2x2CompactingRecipe, offerBannerRecipe, offerBarkBlockRecipe, offerBedRecipe, offerBlasting, offerBoatRecipe, offerBulbRecipe, offerCandleDyeingRecipe, offerCarpetRecipe, offerChestBoatRecipe, offerChiseledBlockRecipe, offerCompactingRecipe, offerCompactingRecipe, offerConcretePowderDyeingRecipe, offerCutCopperRecipe, offerDyeableRecipes, offerGrateRecipe, offerHangingSignRecipe, offerMosaicRecipe, offerNetheriteUpgradeRecipe, offerPlanksRecipe, offerPlanksRecipe2, offerPolishedStoneRecipe, offerPressurePlateRecipe, offerReversibleCompactingRecipes, offerReversibleCompactingRecipesWithCompactingRecipeGroup, offerReversibleCompactingRecipesWithReverseRecipeGroup, offerShapelessRecipe, offerSingleOutputShapelessRecipe, offerSlabRecipe, offerSmelting, offerSmithingTemplateCopyingRecipe, offerSmithingTemplateCopyingRecipe, offerSmithingTemplateCopyingRecipe, offerSmithingTrimRecipe, offerStainedGlassDyeingRecipe, offerStainedGlassPaneDyeingRecipe, offerStainedGlassPaneRecipe, offerStonecuttingRecipe, offerStonecuttingRecipe, offerTerracottaDyeingRecipe, offerWallRecipe, offerWaxingRecipes, run, saveRecipeAdvancement
-
Field Details
-
output
-
-
Constructor Details
-
FabricRecipeProvider
public FabricRecipeProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture)
-
-
Method Details
-
generate
Implement this method and then use the range of methods inRecipeProvider
or from one of the recipe json factories such asShapedRecipeJsonBuilder
orShapelessRecipeJsonBuilder
.- Specified by:
generate
in classRecipeProvider
-
withConditions
Return a new exporter that applies the specified conditions to any recipe json provider it receives. -
run
- Overrides:
run
in classRecipeProvider
-
getRecipeIdentifier
Override this method to change the recipe identifier. The default implementation normalizes the namespace to the mod ID.
-