I have a tool I want to give players but they can only use when its at full durability, I already know how to use the selector damage:0 and set the damage to something, but I would like to refill the item over time, kinda like a cool down timer for the item, how would I go about doing that?
oh also if possible I would like it to work from anywhere in their inventory,
I was thinking mending but it gives it a nasty glow, and wouldn't work if they had any other mending stuff on or if its not selected
replace item needs a defined slot, as I want this item to regenerate passively without having to hold it in main slot (cuz it would be useless if they constantly had to hold it) it wouldn't work,
I thought about data modify or data merge, but i'm too dumb to figure that one out
edit: It could even be a new item that takes its place, because its not really a dynamic item, you shouldn't need enchant or rename it, here is the give command for the full item
/give @s minecraft:carrot_on_a_stick{CustomModelData:1,display:{Name:"{\"text\":\"Killer Queen\",\"italic\":\"false\"}"}}
the only problem with clearing the item and giving it again with increasing durability is that the item may jump slots if you have any other slots empty, which would kind of break the illusion, though if it comes to that then I will