Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Help with recipe file pathing


Recommended Posts

Hello,

I have been working on a mod's custom recipe system and need a bit of help with the resource location for the recipes. I would like to do a system like I have illustrated in the picture attached. The general category would house several various sub categories for specific machine recipes. I know how to have a single folder within the recipes directory. However, I am not quite sure how to do this, and I can't seem to turn anything up on google. If anyone could help me out with this, I would appreciate it.

New Project(4).png

Link to post
Share on other sites

It's mainly for organizational purposes, to keep the code easier to read. I'm not doing anything with the vanilla crafting table recipes or furnace recipes.

Link to post
Share on other sites
17 minutes ago, skip999 said:

It's mainly for organizational purposes, to keep the code easier to read. I'm not doing anything with the vanilla crafting table recipes or furnace recipes.

That doesn't mean you need a custom recipe system. The RecipeManager can support any recipe as long as you give it a recipe type and serializer to work with. The IRecipe class could then be up for interpretation of implementation.

As for organizational purposes, the recipe manager will check any subdirectories, so it makes no difference.

Link to post
Share on other sites

I think I might be explaining myself poorly. I know how to do that. The problem is that when I do that, I can only have one folder inside the \recipes directory e.g. \recipes\mineralcrusher . What I want to do is something along the lines of \recipes\o2o\mineralcrusher. I'm not sure how to do that.

Link to post
Share on other sites
13 minutes ago, skip999 said:

The problem is that when I do that, I can only have one folder inside the \recipes directory e.g. \recipes\mineralcrusher . What I want to do is something along the lines of \recipes\o2o\mineralcrusher. I'm not sure how to do that.

You can have a subdirectory within the recipes. If you're talking about generating them with RecipeProvider, then you would need to write the handling for that within the #save method or something similar.

Link to post
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.

Guest
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 Privacy Policy.