Activate Procedure when VANILLA item is crafted

Started by Green4 on

Topic category: Help with modding (Java Edition)

Last seen on 20:42, 7. Sep 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Activate Procedure when VANILLA item is crafted

Hey everyone!

I was wondering if there was a way to make a procedure that triggers when a vanilla item is crafted. For example, I am making an annoying mod were your pickaxe has a chance to fall apart into two sticks and a pickaxe head. The pickaxe head takes the amount of damage that the pickaxe had but how could I make it so that when you recraft the pickaxe from the head and two sticks, it sets the durability to the durability of the pickaxe head. I wish there was an option to link a procedure to a crafting recipe so that you could do this.

 

Thanks in advance!

Last seen on 14:41, 10. Sep 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a Global Trigger…
Sat, 08/03/2024 - 21:05

There is a Global Trigger called "Item is crafted". Use that and check which Item was crafted and then do something.

For the Recrafting Thing this is a little bit more complex. But you could make your own Recipe for that Recrafting Thing and then change the durability from that is much easier. But if you want to make it modular then you has a lot of work with custom coding because with modular I mean that it automatically recognise it's own Pickaxe Head for each Material (Similar to Tinkers Construct Crafting System). I don't recommend it because it's the most complex thing you will ever make.

Last seen on 20:42, 7. Sep 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! I didn't even know…
Sat, 08/03/2024 - 22:09

Thanks! I didn't even know that existed!