RFC - Implementing alloying recipes in json #353

Closed
opened 2023-07-26 02:23:46 +00:00 by RichieSams · 2 comments
RichieSams commented 2023-07-26 02:23:46 +00:00 (Migrated from github.com)

Hello folks. I'm very excited that EnderIO is coming back. I personally had been working on an EnderIO re-write (though I wasn't very far). However, I discovered this project and I want to help contribute here instead. :)

I found #54 , and I thought that would be a nice starting point. However, in looking at the current recipe implementation, recipes are registered in an event hook.

This works fine. But I'm wondering if you all would be interested in instead defining them as json in data instead. This would allow modpack developers to more easily change recipes to better fit their pack.

Is your feature request related to a problem? Please describe.

As described above, the recipes are described in code, rather than as data. This makes it harder for non-coders to modify / tweak recipes. Both for people wanting to help with the project, as well as modpack creators.

Describe the solution you'd like

Alloying recipes are defined as json, similar to other recipes in Minecraft.

I did this in EnderIO-Reforged, and it should be fairly straightforward to implement here as well.

Example recipe

Recipe registration

Describe alternatives you've considered

An alternative is to keep it as is :)

Hello folks. I'm very excited that EnderIO is coming back. I personally had been working on [an EnderIO re-write](https://github.com/RichieSams/EnderIO-Reforged/tree/wip1) (though I wasn't very far). However, I discovered this project and I want to help contribute here instead. :) I found #54 , and I thought that would be a nice starting point. However, in looking at the current recipe implementation, recipes are registered [in an event hook](https://github.com/Team-EnderIO/EnderIO/blob/dev/1.20.1/src/machines/java/com/enderio/machines/EIOMachines.java#L60). This works fine. But I'm wondering if you all would be interested in instead defining them as json in `data` instead. This would allow modpack developers to more easily change recipes to better fit their pack. **Is your feature request related to a problem? Please describe.** As described above, the recipes are described in code, rather than as data. This makes it harder for non-coders to modify / tweak recipes. Both for people wanting to help with the project, as well as modpack creators. **Describe the solution you'd like** Alloying recipes are defined as json, similar to other recipes in Minecraft. I did this in EnderIO-Reforged, and it *should* be fairly straightforward to implement here as well. [Example recipe](https://github.com/RichieSams/EnderIO-Reforged/blob/wip1/modules/enderio-reforged-base/src/main/resources/data/enderio-reforged/recipes/dark_steel_ingot.json) [Recipe registration](https://github.com/RichieSams/EnderIO-Reforged/blob/wip1/modules/enderio-reforged-base/src/main/java/richiesams/enderio/reforged/recipes/ModRecipes.java) **Describe alternatives you've considered** An alternative is to keep it as is :)
Rover656 commented 2023-07-26 06:10:39 +00:00 (Migrated from github.com)

Howdy! Thanks for coming along and wanting to contribute over here, and nice work so far on your own rewrite!
We do actually have JSON recipes :) The event hook you've found is actually where we register the data generator which will create all of our builtin JSON recipes. You can still use a JSON file to add custom recipes with datapacks.

Thanks a lot for coming along and having a look though!

Howdy! Thanks for coming along and wanting to contribute over here, and nice work so far on your own rewrite! We do actually have JSON recipes :) The event hook you've found is actually where we register the data generator which will create all of our builtin JSON recipes. You can still use a JSON file to add custom recipes with datapacks. Thanks a lot for coming along and having a look though!
RichieSams commented 2023-07-26 15:32:03 +00:00 (Migrated from github.com)

Interesting... I'm curious. What is the motivation for generating the json from code instead of just having it in json to begin with? (I'm still fairly new in Minecraft mod creation)

Interesting... I'm curious. What is the motivation for generating the json from code instead of just having it in json to begin with? (I'm still fairly new in Minecraft mod creation)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Team-EnderIO/EnderIO#353
No description provided.