Posted May 21, 20214 yr 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.
May 21, 20214 yr You can already do this within data recipes, it's just not particularly useful since the data is sorted by its type and not its file location. Why make a custom system rather than use vanilla's RecipeManager?
May 21, 20214 yr Author 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.
May 21, 20214 yr 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.
May 21, 20214 yr Author By custom recipe I mean the recipe categories for the machines. I suppose I should have explained that better.
May 21, 20214 yr 3 minutes ago, skip999 said: By custom recipe I mean the recipe categories for the machines. I suppose I should have explained that better. Ok, just add a new IRecipeType. Boom, new category.
May 21, 20214 yr Author 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.
May 21, 20214 yr 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.
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.