Jump to content

Recommended Posts

Posted

For my mod I have tools which can have different looks but I need to keep the damage in the resulting item when I craft the new tool.

 

GameRegistry.addRecipe(new ItemStack(AlloycraftItems.aluminumtooltest, 1, 1), new Object[]{
        	" A ",
        	" B ",
        	"   ",
        	'B', Items.dye, 'A', new ItemStack(AlloycraftItems.aluminumtooltest, WILDCARD_VALUE, WILDCARD_VALUE)
    	});

Posted

What is this recipe supposed to do?  Normally damage is used either for damage or as metadata.  How is your aluminiumtooltest expected to change colour?

 

-TGG

 

Thanks for responding but I just forgot to change the resulting item to a different one.

Posted

Sorry dude I have absolutely no idea what you mean :)

 

Have you solved your own question?

 

-TGG

 

No not yet :P Here I made an example I have a diamond sword with 5 damage and then if I craft it with lapis then I get an iron sword with the same damage as the diamond sword.

Posted

Ah ok.

 

I think you will need to implement a custom IRecipe for that.

 

GameRegister.addRecipe(myRecipe implements IRecipe);

 

-->Your myRecipe can match diamond sword plus lapis and return an iron sword with the damage copied from the diamond sword.

 

-TGG

Posted

Ah ok.

 

I think you will need to implement a custom IRecipe for that.

 

GameRegister.addRecipe(myRecipe implements IRecipe);

 

-->Your myRecipe can match diamond sword plus lapis and return an iron sword with the damage copied from the diamond sword.

 

-TGG

 

Alright sweet so I got the class made now do I use a if statement to get if the items are there and then replace it with the other item?

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.