Posted April 28, 20169 yr Hey guys! I was wondering if there was an easy way to get a list of itemstacks for the items that make up another in a recipe. I know there is a CraftingManager and i could loop through the recipes but there must be an easier way! Thanks
April 29, 20169 yr Pretty sure that's the only way and if it's not, the other way is just a method that does it for you. Keep in mind that there may be more than one recipe to produce the same ItemStack (both shaped and not). http://i.imgur.com/NdrFdld.png[/img]
April 29, 20169 yr Not to mention smelting! 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.
April 29, 20169 yr Author So keeping all those in mind.. What is the most effective way to do it? Its mostly my own items, so I've got my own Recipe class which takes in an ItemStack to create and a list of itemstacks for a recipe which i manually enter for my own items.
April 29, 20169 yr And the solution has, is, and probably always will be the same: loop through all the registered recipes and keep a Collection of any that match your criteria. You can do this once for all recipes you need during startup, or you could load each one on demand as it comes up. http://i.imgur.com/NdrFdld.png[/img]
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.