Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions src/client/java/com/tcm/MineTale/datagen/ModRecipeProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,32 @@ public ModRecipeProvider(FabricDataOutput output, CompletableFuture<HolderLookup
}

/**
* Creates a RecipeProvider that registers the mod's recipe set: a campfire cooking recipe
* that cooks a porkchop into a cooked porkchop, a furnace cooking recipe that converts a
* porkchop into an acacia boat, and a workbench crafting recipe that assembles a chest from
* logs and sticks.
* Create a RecipeProvider that registers the mod's recipe set to the provided exporter.
*
* Each recipe includes its unlock condition, crafting category, book category, processing time,
* and is saved to the provided exporter under the mod-specific paths:
* "campfire_pork_cooking", "furnace_pork_cooking", and "workbench_wood_chest".
* <p>The produced provider registers these recipes:
* - Campfire pork cooking: cooks a porkchop into a cooked porkchop and is saved as "campfire_pork_cooking".
* - Workbench recipes:
* - Armorers workbench (produces the armorers workbench block) saved as "workbench_armorers_workbench".
* - Furnace workbench T1 (produces the furnace workbench T1 block) saved as "workbench_furnace_workbench_t1".
* - Wood chest (crafts a chest from logs) saved as "workbench_wood_chest".
* - Furnace T1 ingot: smelts copper ore into a copper ingot and is saved as "furnace_t1_copper_ingot".
*
* @param registryLookup provider for looking up game registries and tags used when building recipes
* @param exporter destination used to write the generated recipe JSON files
* @return a RecipeProvider that produces and saves the described recipes to the exporter
* @return a RecipeProvider that generates and saves the described recipes to the exporter
*/
@Override
protected RecipeProvider createRecipeProvider(HolderLookup.Provider registryLookup, RecipeOutput exporter) {
return new RecipeProvider(registryLookup, exporter) {
/**
* Registers three mod-specific recipes with the recipe exporter:
* a campfire pork cooking recipe producing cooked porkchop (unlocked by having a porkchop, saved as "campfire_pork_cooking"), a furnace pork cooking recipe producing an acacia boat (unlocked by having a porkchop, saved as "furnace_pork_cooking"), and a workbench recipe that crafts a chest from 5 logs and 10 sticks (unlocked by having logs, saved as "workbench_wood_chest").
* Register the mod's recipes with the recipe exporter.
*
* <p>Registers the following recipes and their unlock conditions, categories, and export names:
* - Campfire: porkchop → cooked porkchop (unlock: has porkchop; category: MISC; saved as "campfire_pork_cooking").
* - Workbench (Armorers): 2 copper ingots, 10 logs, 5 stone tool materials → armorers workbench (unlock: has workbench; saved as "workbench_armorers_workbench").
* - Workbench (Furnace T1): 6 logs, 6 stone tool materials → furnace workbench T1 (unlock: has workbench; saved as "workbench_furnace_workbench_t1").
* - Workbench (Chests): 10 logs → chest (unlock: has logs; category: MISC; saved as "workbench_wood_chest").
* - Furnace T1 (Ingots): copper ore → copper ingot (time: 10; unlock: has copper ore; saved as "furnace_t1_copper_ingot").
*/
@Override
public void buildRecipes() {
Expand Down