Jump to content

Recommended Posts

Posted

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));
    		}

    }

}

Posted

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.

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.