Topic category: Help with modding (Java Edition)
Hello! I was wondering if it is possible to detect if a player had right-clicked inside of a procedure. I have a custom item, the Zombie Sword, which whenever you right-click with it, I want it to heal you for a small amount (this is not what I need help with), but I want it to be on a cooldown, so you cant just have infinite health. I don't really know how to do this though, because if I make the procedure run whenever a player right clicks, there will be no cooldown, but if I make the procedure run whenever the tool is in your hand, it will be always healing you, not just when you right-click. I looked around briefly and didn't find anything, so I made this forum post. Sorry if its painfully obvious or a duplicate.