Register a function when a tool wears out?

Post Reply
LC Creations
Member
Posts: 82
Joined: Mon Feb 18, 2019 02:53

Register a function when a tool wears out?

by LC Creations » Post

Let's say I created a mod with pink diamond that had a pink diamond pickaxe. I need to register a function that is called when the tool wears out. Is this possible?

MrUnderhill89
Member
Posts: 16
Joined: Fri Jun 03, 2016 13:55
GitHub: mrunderhill89

Re: Register a function when a tool wears out?

by MrUnderhill89 » Post

Not sure if this specific functionality exists, but you could fake it with an on_dignode function that checks the wear of the tool and does your thing (along with destroying the tool) when the wear level is below a threshold.

LC Creations
Member
Posts: 82
Joined: Mon Feb 18, 2019 02:53

Re: Register a function when a tool wears out?

by LC Creations » Post

Well, I cannot do that since the tool is armor and the wear is being set by set_wear() in the armor mod. I am not going to modify the armor mod so I need a workaround.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest