Jump to content

[1.7.2] Sandwich that you can add stuff to


Recommended Posts

I was thinking of making a sandwich in my mod where you would put 2 slices of bread (I already make that item!) together (one on top of the other) to get a Sandwich with item description "empty". Then, you could shapeless craft it with any food to get half the stats of that food added to the sandwich but you can only add a certain number of things to the sandwich and you cannot add twice of the same. I kind of know how to do this but I can't think of any working code. My main problem is accessing and editing a copy of the addShapelessRecipe function. Any help would be appreciated.


Link to comment
Share on other sites

Going off memory and guesswork but here is an idea.


I think you will have to create all the shapeless recipies to generate your sandwich.  Have it output the same 'empty' sandwich.  Might want a different name.


use the crafting event to see what you did and add nbt data to your itemstack for your sandwich indicating what is in it.  Have your render check to see to chagne graphic.  Probably need some packets love here.  Also could change tooltip.


When you do this on the crafting event, if it is full, change it to a different item so the crafting won't work anymore.  It could be a simple extension of the previos item so you don't have to recode, but that will stop the crafting.

Long time Bukkit & Forge Programmer

Happy to try and help

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.