Posted June 1, 201510 yr 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) });
June 1, 201510 yr 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
June 1, 201510 yr Author 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.
June 1, 201510 yr Sorry dude I have absolutely no idea what you mean Have you solved your own question? -TGG
June 1, 201510 yr Author Sorry dude I have absolutely no idea what you mean Have you solved your own question? -TGG No not yet 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.
June 1, 201510 yr 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
June 1, 201510 yr Author 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?
June 1, 201510 yr Hi RecipeRepairItem and RecipeBookCloning are good vanilla examples of how to write an IRecipe. -TGG
June 2, 201510 yr Author Alright I'll start looking into those classes. Thank you so much though for helping me with this.
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.