Started by
Green4
on
Topic category: Help with Minecraft modding (Java Edition)
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!
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.
Thanks! I didn't even know that existed!