Started by Ypermat on Thu, 02/16/2023 - 13:28
Topic category: Help with modding (Java Edition)
I am making an item that damage entities around the player when he use the item.
This effect works well.
For the cooldown I needed to use nbt tags, because even if an item (it's not a weapon) is in "minecraft" cooldown, you can still use it.
(I still use the cooldown block because it gives the item a visual effect.)
The problem is that if I disconnect, then reconnect, the item isn't in cooldown anymore, but as the timer never ended, the nbt tag is still true.
The item is now locked in cooldown.
What can I do to fix this ?
I tought of :
- A command, but it could be abused
- A block to "stabilize" the item, but it could be useful only if the item is locked by deco/reconnection
- A procedure when the item is picked up, but so you could reinitialize the cooldown earlier by dropping and picking up the item
- When right clicked in cooldown, it reset it, but so if you click it too soon players will be annoyed by the cooldown returning to maximum.
Thank you for your help !