Topic category: Help with Minecraft modding (Data Packs)
Hi! I'm working on a mod that adds in a Spinning Wheel, which has a unique but ultimately simple crafting system: Right-click it with blocks/items, when it has enough to craft you keep right-clicking and it spins them. After right-clicking enough (or just has enough energy put into it by something that transfers/generates energy), it outputs an item stack of the result. Using procedures I've made it quite easy to make new recipes for myself, but I want you to be able to add in your own recipes with data packs or another mod like Crafttweaker. How would I go about this?
I'd imagine the JSON for the recipes would look something like this, based off of the JSON recipes of other mod's crafting systems:
{
"type": "modname:spinning_wheel",
"input": {
"item": input,
"amount": in_amount,
"energy": energy_in
},
"output": {
"item": {
"item": output,
"amount": out_amount
},
}
}
Also, currently, my setup for adding recipes using procedures is:
This setup might make it hard to add JSON recipe support (if I can at all), but it might not, I'm not sure, ehehe.
You can make your recipes data-driven, but with the current way of doing recipes(procedures)
This is not possible without coding.
To make recipes data-driven, you need to create IRecipe<>, IRecipeType, and its serializer, then register them and have your crafting block detect it.
Hmm. Ok. Thank you!
Ok, so admittedly... I'm a bit of a newbie when it comes to Java, and I have no idea how to approach doing this. I've looked through the code of some other non-mcreator mods that add in crafting systems on github to try to get a feel of what I need to be doing, but I honestly didn't get much out of it. Do you know how I would go about this, or maybe of a tutorial, whether in these forums or outside for general modding, that I might be able to follow for some direction?
Sorry to ask so much of you, ehehe.