Jump to content

[1.12] Crafting Recipe class question


SirBassington

Recommended Posts

Ok so I'm updating my mod from 1.11 to 1.12 & I understandthe new system in play with the .json format. But I have a minor question about it. Since 1.12 now allows for crafting recipes to be made in .json files, is it okay to completely remove my RecipeManager class that housed all the code of my now non-functional recipes from 1.11 and just replace each recipe with it's own .json file?

I ask because I would hate to have an entire file that's no longer needed since it's only goal was to add crafting recipes since 1.7.10 until now.

Between being a Gamer, a Furry, and a Modder who one day wants to go into Game Dev., time is an absolute waste. ~SirBassington

Link to comment
Share on other sites

I have the same question. It'd be nice to know what are the plans.

 

I think, though I could be wrong, that they are working on making another way for adding crafting recipes as the TODO comments talk about making IRecipe a registry. If whatever comes new doesn't use the same name for methods (addShapedRecipe, addShapelessRecipe, etc), then your RecipeManager class would need a substantial re-writing. For the moment being I think it is better to keep it for reference and re-write it when the time comes, if it ever comes. If once this forge version comes out of beta it results that there is no similar way to add recipes in code then I would remove it. But I'd keep it for now. Just for reference until then.

Edited by ctbe
Add info.
Link to comment
Share on other sites

4 hours ago, ctbe said:

I have the same question. It'd be nice to know what are the plans.

 

I think, though I could be wrong, that they are working on making another way for adding crafting recipes as the TODO comments talk about making IRecipe a registry. If whatever comes new doesn't use the same name for methods (addShapedRecipe, addShapelessRecipe, etc), then your RecipeManager class would need a substantial re-writing. For the moment being I think it is better to keep it for reference and re-write it when the time comes, if it ever comes. If once this forge version comes out of beta it results that there is no similar way to add recipes in code then I would remove it. But I'd keep it for now. Just for reference until then.

 

I'm pretty sure the recipe system we have now is what those comments are talking about, they just haven't been updated yet.

 

Now that IRecipe extends IForgeRegistryEntry, you can add a recipe in code by registering an IRecipe object with ForgeRegistries.RECIPES; just like any other IForgeRegistryEntry. I think using the JSON system where possible is preferred, though.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Ok so I took the time to mess around with my setup some more and have decided to keep the code in my mod but make the 200ish recipes I had from before but in .json format, what a pain. I have decided on keeping the old code in an unused state and continue with the changes as Forge for 1.12 becomes more stable and then decide later if I want to permanently delete it after configuring it a bit more obviously or keep it for reference for whatever the cause in the future.

 

Thank you all so much for your input and thoughts!

Between being a Gamer, a Furry, and a Modder who one day wants to go into Game Dev., time is an absolute waste. ~SirBassington

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.