Skip to content
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

Implement custom crafting recipes as official JSON recipes #1053

Merged
merged 20 commits into from
Nov 17, 2024

Conversation

misode
Copy link
Member

@misode misode commented Sep 23, 2024

Notes

Todo

  • Create initial recipe JSON files
  • Add recipe unlock advancements
  • Update record crafting advancement
  • 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

Leaving out: auto crafter, heart canister tier 2, relocators, scuba gear
Slightly modifiers: ender hopper minecart, liquid minecart
Discarding item data: boots of ostara, mountaineering
@misode misode added the feature-update An additional feature has been added to a module label Sep 24, 2024
@misode misode changed the title Port custom crafting recipes to official JSON recipes Implement custom crafting recipes as official JSON recipes Sep 24, 2024
@BPR02
Copy link
Member

BPR02 commented Sep 25, 2024

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)

@misode misode marked this pull request as ready for review September 25, 2024 00:40
@SpecialBuilder32
Copy link
Member

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?

@BPR02
Copy link
Member

BPR02 commented Sep 25, 2024

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.

@misode
Copy link
Member Author

misode commented Oct 10, 2024

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 misode requested a review from Bloo-dev November 7, 2024 23:59
Copy link
Member

@SpecialBuilder32 SpecialBuilder32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the automatic overlay stuff you've got here Misode 💙

@misode misode merged commit 0bbbf2a into Gamemode4Dev:master Nov 17, 2024
3 checks passed
@misode misode deleted the json-recipes branch November 17, 2024 20:08
github-actions bot pushed a commit that referenced this pull request Nov 17, 2024
…1053)

* Port custom crafting recipes to official JSON recipes when possible

Leaving out: auto crafter, heart canister tier 2, relocators, scuba gear
Slightly modifiers: ender hopper minecart, liquid minecart
Discarding item data: boots of ostara, mountaineering

* Add recipe unlock advancements

* Update record crafting advancement

* Optimize scuba gear advancement

* Fix red_nether_bricks unlock was missing

* Add group field to forming press recipes

* Add standard crafting recipes except stairs and slabs

* Generate standard crafting slabs and stairs recipes

* Group stairs and slabs recipes together with vanilla recipes

* Revert forming press changes

* Update recipes to 1.21.3

* Update standard crafting recipes

* Remove attribute prefix from crampons recipe

* Keep the old format for gm4_recipes

* Backport recipes with beet

* Handle when both attributes and recipe rewrites affect the same file

* Catch recipe rewrite errors

* Remove manually backported soul glass recipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-update An additional feature has been added to a module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving custom recipes to official recipes
3 participants