Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughRefactors data-gen recipe registration into modular recipe builder classes, removes several unused imports, adds a new recipe display type for armorers, and implements memory-backed client recipe selection plus a server-side guarded craft request handler that differentiates workbench vs. armorers menus. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/client/java/com/tcm/MineTale/datagen/ModRecipeProvider.java (1)
36-62:⚠️ Potential issue | 🟡 MinorStale Javadoc — references recipes that moved to
WorkbenchRecipes.java.The class-level Javadoc (lines 40–44) still lists
"workbench_armorers_workbench"and"workbench_furnace_workbench_t1"as produced by this provider. The innerbuildRecipes()Javadoc (lines 57–61) repeats the same. Both were moved toWorkbenchRecipes.buildRecipes. Consider updating both doc blocks to reflect only the recipes still registered inline here (campfire pork, wood chest, furnace T1 copper ingot) and note that further recipes are delegated to the modular builders.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/client/java/com/tcm/MineTale/datagen/ModRecipeProvider.java` around lines 36 - 62, Update the stale Javadoc in ModRecipeProvider: in the class-level docblock and the inner buildRecipes() docblock (inside createRecipeProvider's returned RecipeProvider), remove the references to "workbench_armorers_workbench" and "workbench_furnace_workbench_t1" and any wording that says those recipes are produced here; instead document that this provider only registers campfire pork cooking, workbench wood chest, and furnace_t1_copper_ingot, and add a short note that additional workbench recipes are delegated to WorkbenchRecipes.buildRecipes. Ensure the updated comments reference ModRecipeProvider and WorkbenchRecipes.buildRecipes so readers can find the modular builder.
🧹 Nitpick comments (1)
src/client/java/com/tcm/MineTale/datagen/recipes/FurnitureRecipes.java (1)
10-54: Commented recipes are missing.time()calls.Every other active recipe (and the TODO blocks in other files) chains a
.time(n)call. All five commented-out furniture recipes omit it. When these are uncommented, the builder will use whatever default applies — worth adding.time(...)now to avoid a silent misconfiguration later.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/client/java/com/tcm/MineTale/datagen/recipes/FurnitureRecipes.java` around lines 10 - 54, The commented WorkbenchRecipeBuilder recipes (e.g., the builders creating WOODCUTTERS_BLOCK, LARGE_PILE_OF_BOOKS, SMALL_PILE_OF_BOOKS, KWEEBEC_PLUSHIE, OLD_SCROLL) are missing a .time(...) chain call; when uncommented they'll inherit a default time. Update each WorkbenchRecipeBuilder chain (for ModRecipes.FURNITURE_TYPE / ModRecipes.FURNITURE_SERIALIZER) to include an appropriate .time(n) before .output(...) or before .unlockedBy(...) consistent with other recipes so they use the intended crafting duration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/client/java/com/tcm/MineTale/datagen/recipes/ArmorRecipes.java`:
- Around line 51-79: The commented WoodenArmor block is a copy of the copper
recipes and will cause duplicate ResourceKey errors when enabled; update the
WorkbenchRecipeBuilder calls (the block using WorkbenchRecipeBuilder,
ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) to use the correct
wood-based input and output item symbols instead of
Items.COPPER_INGOT/Items.COPPER_HELMET/Items.COPPER_LEGGINGS/Items.COPPER_CHESTPLATE,
change the unlock criterion provider.has(...) to reference the appropriate
wooden item (e.g., a wooden plank/ingot symbol from ModItems or ItemTags), and
give each .save(exporter, "...") a unique wood-specific key (do not reuse
"copper_cuirass", "copper_helmet", "copper_greaves", etc.) so the recipe
ResourceKeys are distinct from the copper recipes.
- Around line 42-49: The commented Copper Gauntlets recipe block wrongly outputs
Items.COPPER_LEGGINGS and is missing the recipe book category; when uncommenting
the WorkbenchRecipeBuilder block for the Copper Gauntlets (the one saving as
"copper_gauntlets"), change .output(Items.COPPER_LEGGINGS) to the correct
gauntlet item (e.g., ModItems.COPPER_GAUNTLETS or the project’s copper gauntlet
identifier) and add .bookCategory(ModRecipeDisplay.ARMORERS_SEARCH) to match the
other armor recipes before calling .save(exporter, "copper_gauntlets").
---
Outside diff comments:
In `@src/client/java/com/tcm/MineTale/datagen/ModRecipeProvider.java`:
- Around line 36-62: Update the stale Javadoc in ModRecipeProvider: in the
class-level docblock and the inner buildRecipes() docblock (inside
createRecipeProvider's returned RecipeProvider), remove the references to
"workbench_armorers_workbench" and "workbench_furnace_workbench_t1" and any
wording that says those recipes are produced here; instead document that this
provider only registers campfire pork cooking, workbench wood chest, and
furnace_t1_copper_ingot, and add a short note that additional workbench recipes
are delegated to WorkbenchRecipes.buildRecipes. Ensure the updated comments
reference ModRecipeProvider and WorkbenchRecipes.buildRecipes so readers can
find the modular builder.
---
Nitpick comments:
In `@src/client/java/com/tcm/MineTale/datagen/recipes/FurnitureRecipes.java`:
- Around line 10-54: The commented WorkbenchRecipeBuilder recipes (e.g., the
builders creating WOODCUTTERS_BLOCK, LARGE_PILE_OF_BOOKS, SMALL_PILE_OF_BOOKS,
KWEEBEC_PLUSHIE, OLD_SCROLL) are missing a .time(...) chain call; when
uncommented they'll inherit a default time. Update each WorkbenchRecipeBuilder
chain (for ModRecipes.FURNITURE_TYPE / ModRecipes.FURNITURE_SERIALIZER) to
include an appropriate .time(n) before .output(...) or before .unlockedBy(...)
consistent with other recipes so they use the intended crafting duration.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
src/client/java/com/tcm/MineTale/datagen/ModBlockTagProvider.javasrc/client/java/com/tcm/MineTale/datagen/ModLootTableProvider.javasrc/client/java/com/tcm/MineTale/datagen/ModRecipeProvider.javasrc/client/java/com/tcm/MineTale/datagen/recipes/ArmorRecipes.javasrc/client/java/com/tcm/MineTale/datagen/recipes/BuilderRecipes.javasrc/client/java/com/tcm/MineTale/datagen/recipes/FarmerRecipes.javasrc/client/java/com/tcm/MineTale/datagen/recipes/FurnitureRecipes.javasrc/client/java/com/tcm/MineTale/datagen/recipes/WorkbenchRecipes.javasrc/main/java/com/tcm/MineTale/registry/ModItems.java
💤 Files with no reviewable changes (3)
- src/main/java/com/tcm/MineTale/registry/ModItems.java
- src/client/java/com/tcm/MineTale/datagen/ModLootTableProvider.java
- src/client/java/com/tcm/MineTale/datagen/ModBlockTagProvider.java
| // CopperGauntlets - TODO: CopperGauntlets Not Implemented. | ||
| // new WorkbenchRecipeBuilder(ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) | ||
| // .input(Items.COPPER_INGOT, 5) | ||
| // .input(ModItems.PLANT_FIBER, 1) | ||
| // .output(Items.COPPER_LEGGINGS) | ||
| // .time(3) | ||
| // .unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT)) | ||
| // .save(exporter, "copper_gauntlets"); |
There was a problem hiding this comment.
Copper Gauntlets placeholder has the wrong output and is missing .bookCategory().
Line 46 has .output(Items.COPPER_LEGGINGS) — a direct copy-paste from the greaves recipe. When this block is uncommented it will silently produce leggings instead of gauntlets. It also lacks the .bookCategory(ModRecipeDisplay.ARMORERS_SEARCH) call present on all three active armor recipes.
🐛 Suggested corrections (for when this is uncommented)
-// .output(Items.COPPER_LEGGINGS)
+// .output(ModItems.COPPER_GAUNTLETS) // replace with the actual gauntlets item when registered
.time(3)
.unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT))
+// .bookCategory(ModRecipeDisplay.ARMORERS_SEARCH)
.save(exporter, "copper_gauntlets");📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // CopperGauntlets - TODO: CopperGauntlets Not Implemented. | |
| // new WorkbenchRecipeBuilder(ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) | |
| // .input(Items.COPPER_INGOT, 5) | |
| // .input(ModItems.PLANT_FIBER, 1) | |
| // .output(Items.COPPER_LEGGINGS) | |
| // .time(3) | |
| // .unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT)) | |
| // .save(exporter, "copper_gauntlets"); | |
| // CopperGauntlets - TODO: CopperGauntlets Not Implemented. | |
| // new WorkbenchRecipeBuilder(ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) | |
| // .input(Items.COPPER_INGOT, 5) | |
| // .input(ModItems.PLANT_FIBER, 1) | |
| // .output(ModItems.COPPER_GAUNTLETS) // replace with the actual gauntlets item when registered | |
| // .time(3) | |
| // .unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT)) | |
| // .bookCategory(ModRecipeDisplay.ARMORERS_SEARCH) | |
| // .save(exporter, "copper_gauntlets"); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/client/java/com/tcm/MineTale/datagen/recipes/ArmorRecipes.java` around
lines 42 - 49, The commented Copper Gauntlets recipe block wrongly outputs
Items.COPPER_LEGGINGS and is missing the recipe book category; when uncommenting
the WorkbenchRecipeBuilder block for the Copper Gauntlets (the one saving as
"copper_gauntlets"), change .output(Items.COPPER_LEGGINGS) to the correct
gauntlet item (e.g., ModItems.COPPER_GAUNTLETS or the project’s copper gauntlet
identifier) and add .bookCategory(ModRecipeDisplay.ARMORERS_SEARCH) to match the
other armor recipes before calling .save(exporter, "copper_gauntlets").
| // TODO: WoodenArmor Not Implemented | ||
| // new WorkbenchRecipeBuilder(ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) | ||
| // .input(ItemTags.LOGS, lookup, 15) | ||
| // .input(ModItems.PLANT_FIBER, 3) | ||
| // .output(Items.COPPER_CHESTPLATE) | ||
| // .time(3) | ||
| // .unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT)) | ||
| // .save(exporter, "copper_cuirass"); | ||
| // new WorkbenchRecipeBuilder(ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) | ||
| // .input(Items.COPPER_INGOT, 6) | ||
| // .input(ModItems.PLANT_FIBER, 2) | ||
| // .output(Items.COPPER_HELMET) | ||
| // .time(3) | ||
| // .unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT)) | ||
| // .save(exporter, "copper_helmet"); | ||
| // new WorkbenchRecipeBuilder(ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) | ||
| // .input(Items.COPPER_INGOT, 9) | ||
| // .input(ModItems.PLANT_FIBER, 3) | ||
| // .output(Items.COPPER_LEGGINGS) | ||
| // .time(3) | ||
| // .unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT)) | ||
| // .save(exporter, "copper_greaves"); | ||
| // new WorkbenchRecipeBuilder(ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) | ||
| // .input(Items.COPPER_INGOT, 5) | ||
| // .input(ModItems.PLANT_FIBER, 1) | ||
| // .output(Items.COPPER_LEGGINGS) | ||
| // .time(3) | ||
| // .unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT)) | ||
| // .save(exporter, "copper_gauntlets"); |
There was a problem hiding this comment.
WoodenArmor TODO block is an unmodified copy of the copper armor recipes — will crash datagen when uncommented.
The block still uses:
Items.COPPER_INGOT/Items.COPPER_HELMET/Items.COPPER_LEGGINGS/Items.COPPER_CHESTPLATEas inputs/outputs instead of any wood-based items.- The same save keys (
"copper_cuirass","copper_helmet","copper_greaves") as the active recipes above.
Duplicate recipe ResourceKeys cause Minecraft's datagen to throw an IllegalStateException, so uncommenting this block as-is will break the data generation run. The inputs, outputs, unlock criterion, and save keys all need to be adapted to wooden armor items before activation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/client/java/com/tcm/MineTale/datagen/recipes/ArmorRecipes.java` around
lines 51 - 79, The commented WoodenArmor block is a copy of the copper recipes
and will cause duplicate ResourceKey errors when enabled; update the
WorkbenchRecipeBuilder calls (the block using WorkbenchRecipeBuilder,
ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) to use the correct
wood-based input and output item symbols instead of
Items.COPPER_INGOT/Items.COPPER_HELMET/Items.COPPER_LEGGINGS/Items.COPPER_CHESTPLATE,
change the unlock criterion provider.has(...) to reference the appropriate
wooden item (e.g., a wooden plank/ingot symbol from ModItems or ItemTags), and
give each .save(exporter, "...") a unique wood-specific key (do not reuse
"copper_cuirass", "copper_helmet", "copper_greaves", etc.) so the recipe
ResourceKeys are distinct from the copper recipes.
Don't merge until all plant fibre recipes are in and are able to be datagenned.
Summary by CodeRabbit
New Features
Bug Fixes / Improvements
Chores