Jump to content

Recommended Posts

Posted

I am working on a mod and it requires me to add a recipe for all items in minecraft. The item copycore(mymod) has a durability of 50.I want it to be able to be crafted shapelessly with any item and craft two items essentially duplicating it.example apple and copycore in craftingtable=2 apples and cpycore take 1 damage.I just can't think of way to include a recipe for all the items.Anyone have suggestions

Posted

That, sir, is the definition of flexibility.

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.

Posted

I was hoping for a solution like this except this does not work

 

public void addDuplicate()
{
	Set itemReg=GameData.getItemRegistry().getKeys();
	  List<ResourceLocation> itemList=new ArrayList<ResourceLocation>();
	  itemList.addAll(itemReg);
	  for (  ResourceLocation itemName : itemList) 
	  {
	    Item itemm=GameData.getItemRegistry().getObject(itemName);
	    GameRegistry.addShapelessRecipe(new ItemStack(itemm), mainEA.CopyCore,itemm);		  
	  }		
}

Posted

I don't think your shapeless recipe is quite right. Your output stack doesn't have a '2' quantity. Am I missing where the itemm input is not consumed?

 

Also see this earlier thread about recipes to change damage instead of consuming an input.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

Yes I left it at one for the sake of solving the bigger problem this method works with only a couple blocks

 

UPDATE I decide to try irecipe and it was much simpler so thank you for the suggestion. I didn't understand it at first and so I was hesitant but it was definitely the most efficient memory wise as well

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.