Posted August 5, 201312 yr Not getting errors but can't get the recipe working, and there's not much online to compare to. I want to make 9 pieces into 1 part. I have a "piece" item and a "part" item, each item has 3 subsets. Any help is greatly appreciated. package pstones.items; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class Items { public static Item piece; public static Item part; public static void init(){ piece = new ItemPiece(ItemRef.PIECE_ID); part = new ItemPart(ItemRef.PART_ID); } public static void addNames(){ for (int i = 0; i < ItemRef.PIECE_NAMES.length; i++){ LanguageRegistry.addName(new ItemStack(piece, 1, i), ItemRef.PIECE_NAMES[i]); } for (int i = 0; i < ItemRef.PART_NAMES.length; i++){ LanguageRegistry.addName(new ItemStack(part, 1, i), ItemRef.PART_NAMES[i]); } } public static void registerRecipes(){ for(int i = 0;i < 3;i++){ GameRegistry.addRecipe(new ItemStack(ItemRef.PART_DEFAULT,1,i), "XXX","XXX","XXX", Character.valueOf('X'), new ItemStack(ItemRef.PIECE_DEFAULT,1,i)); } } }
August 5, 201312 yr Hmmm maybe because you are implement your referenceclass for the Items instead your Items^^"
August 5, 201312 yr I think that it has something to do with your for loop, that could be making the wrong numbers that represent the metadata that you require. Try removing it and declearing each recipe individually (I know, it's a pain to do), that is what i have in a previous mod that I made, and that worked.
August 5, 201312 yr Author Of course I catch my error after I post something in a forum. I forgot to initialize recipes in the main class. thank you for help
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.