Jump to content

Guidance on Custom Recipe Type


Recommended Posts

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.


Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.


DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I understand the JSON fine, I guess I didn’t explain the issue correctly. I’m attempting to make a machine, and I need to add recipes for it. I can’t puzzle how to add a new recipe type or how the recipe classes work, i.e. `IRecipeHolder` and `IRecipe`. I’ve attempted to look at how the furnace achieves this in `AbstractFurnaceTileEntity`, but to no avail.


I’m trying to add a new type of recipe.

Link to comment
Share on other sites

  • 6 months later...

Creating your own recipe type involves some amount of code. Not too much. I've been able to scrape up a lot of stuff off the web 

and figure out how to create multiple recipe types. 

Big thanks to turtywurty and his source code here https://github.com/DaRealTurtyWurty/1.15-Tut-Mod


for your first machine you'll need to create 4 new classes for the custom recipe type.


[1] IMachineNameRecipe.java

[2] MachienNameRecipe.java

[3] MachineNameSerializer.java


and the most important 

[4] RecipeSerializerInit.java

I say this is the most important because it is here in this file that you register your new recipe types for your different machines. 

You could essentially copy and paste this code and replace the machine names with the what ever your machine class is and it should work.

Just pay special attention to IMillRecipe (IMachineNameRecipe), because you define a path to your recipe json files here. I have it set to mill_recipes so in my directory I see


and the same goes for file RecipeSerializerInit. Under the comment Machine Serializers you'll be able to see a bunch of other machines with their defined paths being defined as they're being registered.

Last but not least,

you have to be able to tell your tile entity where to go look for these recipes so I've attached a copy of my Mill TileEntity so you can 

see what functions it calls when it crushes items. *hint look at the tick function


This is the best I can explain it. Good Luck


IMillRecipe.java MillRecipe.java MillRecipeSerializer.java MillTileEntity.java RecipeSerializerInit.java

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.

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.