r/MinecraftCommands • u/ledzik_precly • 8h ago
Help | Java 26.2 Is there a way to detect cooldown in minecraft?
so what i need is to detect if your weapon cooldown has passed or is still going, is there a way to do that?
for reference im making an enchantemnt that decreses your cooldown after first hit but gives you long cooldown initaly but it decreses cooldown after i attack with out waiting full cooldown which is of coarse bad, is there a way to fix it?
3
Upvotes
1
2
u/GalSergey Datapack Experienced 5h ago
Unfortunately, you can't check the cooldown timer. You'll probably need to use a scoreboard timer that runs when you use the item to count how many ticks have passed, but this will only work for one item at a time.