shane020482 Posted January 29, 2017 Share Posted January 29, 2017 Im creating a custom recipe class and cant figure out how to use items with meta. I know that in a reg recipe you do ModItems.itemname, #of items, item# however that is not working http://pastebin.com/3n0aRsVj Quote Link to comment Share on other sites More sharing options...
shane020482 Posted January 29, 2017 Author Share Posted January 29, 2017 Yea i didnt think getItemById was right but at the time I was willing to try anything, after reading your post I think I figured it out. I ended up creating 2 recipe types which takes care of the errors I was having in the recipe class. But now Im not sure how to call the meta method in my TE, for my item method I used ItemStack stack = AlloyRecipes.getAlloyResult(slots[0].getItem(), slots[1].getItem()); http://pastebin.com/3RChj41Y Quote Link to comment Share on other sites More sharing options...
shane020482 Posted January 29, 2017 Author Share Posted January 29, 2017 Well thanks for all your help but writing a comparison logic is just too much of a headache, when I can just create each item separately fairly easily because im using an itembase all I need to do is in my iteminit add public static Item Ingot_Copper; ect... public static void init() { Ingot_Copper = new itembase("ingot_copper", "item_ingot_copper"); ect... } its really no harder than creating an enum class and makes the custom recipe work without any headache And Thanks Again Quote Link to comment Share on other sites More sharing options...
shane020482 Posted January 29, 2017 Author Share Posted January 29, 2017 Because it lets me use private static ItemStack getOutput(Item item, Item item1) { if (item == ModItems.Ingot_Copper && item1 == ModItems.Ingot_Tin || item == ModItems.Ingot_Tin && item1 == ModItems.Ingot_Copper) { return new ItemStack(ModItems.Ingot_Bronze, 2); } return null; } which works fine Quote Link to comment Share on other sites More sharing options...
shane020482 Posted January 29, 2017 Author Share Posted January 29, 2017 I know but due to the hassle of using meta vs the ease of separate items Iv decided to use separate items. So even though Im not using meta anymore our discussion has shown that you can use meta by writing your own comparison logic or you can separate items. So now ppl who look at this post can see the 2 methods that can be used and decide for themselves how they want to do custom recipes. Now should I edit the OP to state this? Quote Link to comment Share on other sites More sharing options...
shane020482 Posted January 29, 2017 Author Share Posted January 29, 2017 Thats why its up to modders to decide how best to use each method. For me due to the fact Im only creating a small handful of ingots and the ease of creating separate items Im using that method for this case. However for other items that use standard recipes Ill be using meta. And besides just think of how big of a mod you would need to make to even come close to hitting the ID max I mean there are mods out there that have hundreds of items and mod packs that have countless mods in them and yet theres been no prob with IDs. Quote Link to comment Share on other sites More sharing options...
Draco18s Posted January 30, 2017 Share Posted January 30, 2017 And besides just think of how big of a mod you would need to make to even come close to hitting the ID max... You mean about 32,000? Feed The Beast runs up against that limit all the time. Quote 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 More sharing options...
Recommended Posts
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.