GM4_Datapacks icon indicating copy to clipboard operation
GM4_Datapacks copied to clipboard

Implement custom crafting recipes as official JSON recipes

Open misode opened this issue 1 year ago • 4 comments

  • Closes #980

Notes

  • Leaving out: auto crafter, heart canister tier 2, relocators, scuba gear
  • Leaving out: forming press #1058
  • Slightly modifies: ender hopper minecart, liquid minecart
  • Discarding item data: boots of ostara, mountaineering

Todo

  • [x] Create initial recipe JSON files
  • [x] Add recipe unlock advancements
  • [x] Update record crafting advancement
  • [x] Overwrite some vanilla recipes to add group field for forming press recipes
  • [ ] Update wiki, guidebook, readme
  • [ ] Maybe: rebrand record crafting, standard crafting, and forming press

Future work

  • Switch from custom_name to item_name and rarity
  • Discuss whether we want to add a [GM4] <module name> tag line
  • Support conventional tags
  • Remove auto crafting module

misode avatar Sep 23 '24 23:09 misode

I think @Bloo-dev should weigh in on this convo, but I think porting the forming press recipes into normal crafting kinda bypasses the extra step that makes those double brick recipes warranted to be in the game. Perhaps we can switch it to just taking item stacks and using those (e.g. 8 cobblestone in one slot + 1 clay would create stone bricks). The original CC system wouldn't allow for differently stacked item counts, but given that system will eventually be gone we can rewrite Forming Press (again :P)

BPR02 avatar Sep 25 '24 00:09 BPR02

When guidebook added the gm4_recipe format for displaying recipes, it was done with future goal of being a format we could easily generate vanilla (or smithed crafter) recipes from. I'd prefer to only have one or the other, to keep the recipe defined in only one place.

I also wish we didn't have to duplicate custom item definitions, once in the loot table (which is a nice /give alternative) and once in the recipe. I think it might be good to either generate/mutate the recipe files using the loot table definitions as a source of truth, or generate the loot table files from these recipe definitions as a source of truth.

On a side note, is smithed crafter mostly dead with componentized output recipes? Is smithed crafter cross-features still something we think would be good?

SpecialBuilder32 avatar Sep 25 '24 03:09 SpecialBuilder32

When guidebook added the gm4_recipe format for displaying recipes, it was done with future goal of being a format we could easily generate vanilla (or smithed crafter) recipes from. I'd prefer to only have one or the other, to keep the recipe defined in only one place.

I believe the ideal situation is to get rid of gm4_recipe completely which will only be possible when we get proper custom items. At that point the custom crafter can be discontinued and we'd need to update the guidebook to parse the (normal data driven) recipe files instead. Misode probably left the gm4_recipe files since removing them would mean updating the guidebook script...again.

I also wish we didn't have to duplicate custom item definitions, once in the loot table (which is a nice /give alternative) and once in the recipe. I think it might be good to either generate/mutate the recipe files using the loot table definitions as a source of truth, or generate the loot table files from these recipe definitions as a source of truth.

We could probably do something similar to CMD where we inject custom data into the recipe files and replace them during the build. I'm in favor of using beet to parse the loot table and inject it into the recipe output, but that would take some work.

On a side note, is smithed crafter mostly dead with componentized output recipes? Is smithed crafter cross-features still something we think would be good?

I think ideally the Smithed Crafter is phased out just like the GM4 custom crafter. Given we have had hints of custom items, I don't think the smithed crafter should be a priority. The smithed libraries are pretty neglected, but rx has been wanting to do a "weld plugin" which would take all data driven recipe files and add them to the crafter. So if that ever becomes a thing (unlikely to happen before custom items tbh), we'd just need our recipe files ready.

BPR02 avatar Sep 25 '24 05:09 BPR02

I think this PR is ready now. I did not switch gm4_recipes to mojang's recipe files, so there is still some duplicate information. Since not all of our recipes can be described using the official JSON recipes, it would mean maintaining two separate formats for the guidebook.

This PR is meant as an initial step towards more standardized items and recipes, to make these recipes more accessible to players. It can definitely be improved in the future.

misode avatar Oct 10 '24 17:10 misode