-
Notifications
You must be signed in to change notification settings - Fork 0
Feature - plant fibre recipes #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.21
Are you sure you want to change the base?
Changes from all commits
3e44bec
dd6ea76
07a58ad
5494aff
47b8eac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,83 @@ | ||||||||||||||||||||||||||||||||||||
| package com.tcm.MineTale.datagen.recipes; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| import com.tcm.MineTale.datagen.builders.WorkbenchRecipeBuilder; | ||||||||||||||||||||||||||||||||||||
| import com.tcm.MineTale.registry.ModItems; | ||||||||||||||||||||||||||||||||||||
| import com.tcm.MineTale.registry.ModRecipeDisplay; | ||||||||||||||||||||||||||||||||||||
| import com.tcm.MineTale.registry.ModRecipes; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| import net.minecraft.core.HolderLookup; | ||||||||||||||||||||||||||||||||||||
| import net.minecraft.data.recipes.RecipeOutput; | ||||||||||||||||||||||||||||||||||||
| import net.minecraft.data.recipes.RecipeProvider; | ||||||||||||||||||||||||||||||||||||
| import net.minecraft.world.item.Items; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| public class ArmorRecipes { | ||||||||||||||||||||||||||||||||||||
| public static void buildRecipes(RecipeProvider provider, RecipeOutput exporter, HolderLookup.Provider lookup) { | ||||||||||||||||||||||||||||||||||||
| new WorkbenchRecipeBuilder(ModRecipes.ARMORERS_TYPE, ModRecipes.ARMORERS_SERIALIZER) | ||||||||||||||||||||||||||||||||||||
| .input(Items.COPPER_INGOT, 11) | ||||||||||||||||||||||||||||||||||||
| .input(ModItems.PLANT_FIBER, 4) | ||||||||||||||||||||||||||||||||||||
| .output(Items.COPPER_CHESTPLATE) | ||||||||||||||||||||||||||||||||||||
| .time(3) | ||||||||||||||||||||||||||||||||||||
| .unlockedBy("has_copper_ingot", provider.has(Items.COPPER_INGOT)) | ||||||||||||||||||||||||||||||||||||
| .bookCategory(ModRecipeDisplay.ARMORERS_SEARCH) | ||||||||||||||||||||||||||||||||||||
| .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)) | ||||||||||||||||||||||||||||||||||||
| .bookCategory(ModRecipeDisplay.ARMORERS_SEARCH) | ||||||||||||||||||||||||||||||||||||
| .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)) | ||||||||||||||||||||||||||||||||||||
| .bookCategory(ModRecipeDisplay.ARMORERS_SEARCH) | ||||||||||||||||||||||||||||||||||||
| .save(exporter, "copper_greaves"); | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| // 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"); | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+49
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copper Gauntlets placeholder has the wrong output and is missing Line 46 has 🐛 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
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| // 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"); | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+51
to
+79
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WoodenArmor TODO block is an unmodified copy of the copper armor recipes — will crash datagen when uncommented. The block still uses:
Duplicate recipe 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package com.tcm.MineTale.datagen.recipes; | ||
|
|
||
| import net.minecraft.core.HolderLookup; | ||
| import net.minecraft.data.recipes.RecipeOutput; | ||
| import net.minecraft.data.recipes.RecipeProvider; | ||
|
|
||
| public class BuilderRecipes { | ||
| public static void buildRecipes(RecipeProvider provider, RecipeOutput exporter, HolderLookup.Provider lookup) { | ||
|
|
||
| // TODO: BUILDERS_WORKBENCH_BLOCK & ROPE Not Implemented | ||
| // new WorkbenchRecipeBuilder(ModRecipes.BUILDER_TYPE, ModRecipes.BUILDER_SERIALIZER) | ||
| // .input(ModItems.PLANT_FIBER) | ||
| // .output(ModBlocks.ROPE.asItem()) | ||
| // .time(3) | ||
| // .unlockedBy("has_builders_workbench", provider.has(ModBlocks.BUILDERS_WORKBENCH_BLOCK.asItem())) | ||
| // .bookCategory(ModRecipeDisplay.BUILDER_SEARCH) | ||
| // .save(exporter, "builders_workbench_rope"); | ||
|
|
||
| // TODO: BUILDERS_WORKBENCH_BLOCK & ROPE_DIAGONAL Not Implemented | ||
| // new WorkbenchRecipeBuilder(ModRecipes.BUILDER_TYPE, ModRecipes.BUILDER_SERIALIZER) | ||
| // .input(ModItems.PLANT_FIBER) | ||
| // .output(ModBlocks.ROPE_DIAGONAL.asItem()) | ||
| // .time(3) | ||
| // .unlockedBy("has_builders_workbench", provider.has(ModBlocks.BUILDERS_WORKBENCH_BLOCK.asItem())) | ||
| // .bookCategory(ModRecipeDisplay.BUILDER_SEARCH) | ||
| // .save(exporter, "builders_workbench_rope_diagonal"); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix cookTime type mismatch breaking the build.
cookTimeis now a float, butWorkbenchRecipestill expects anint, triggering the lossy conversion error in the build. Convert the float seconds to int ticks at assignment (or updateWorkbenchRecipeand its serializer to accept float if that’s truly required).🛠️ Proposed fix (keep int ticks, allow float seconds)
Also applies to: 188-191, 268-272
🤖 Prompt for AI Agents