Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      Server Move   09/13/18

      I (Dries007) have recently taken over as main developer and server admin. This involved moving servers to reduce cost. It's likely there will be some more downtime in the future but most  things should be sorted by now. This forum is in dire need of replacement as the software is quite old and can't be easily updated. If you wish to discuss or stay updated, join our discord: https://invite.gg/terrafirmacraft. The forum will remain available to read, but will be locked in the future, when a new system is setup. The forum and wiki are now ad free. If you'd like to contribute to keeping it that way, you can do so via paypal or patreon.
ciekma

item damage in shapeless ore recipe

3 posts in this topic

I'm trying to make TFC add-on, but get stuck at problem with recipe which should make tool damage instead of consuming it.

My recipe looks as follows:

GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TFCItems.Stick), new Object[] {new ItemStack(ModItems.itemWoodenTwig, 1, 0), "itemKnife"}));

unfortunately knife is consumed instead of reused/damaged. I checked TFC code, similar code was used and tools are treated properly, any idea what is wrong with above?

0

Share this post


Link to post
Share on other sites

You need to look at the craftingHandler class. It sets recipe conditionals to copy the tool remove 1 durability and give you a tool. This is unlike other mods which make tools container items which handle this. Which is why autocrafters don't work right with TFC. 

0

Share this post


Link to post
Share on other sites

Och, here it is. Bunsan, thank you for the answer, I added my handler and it works fine now.

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now