#How to get better cooldowns for my drinks?

18 messages · Page 1 of 1 (latest)

unkempt grove
#

I have drink items that I assigned a cooldown, however immediately as you start drinking the cooldown starts, so even if you stop drinking mid-way you still have to wait for the cooldown, is there a way to change this so only once drunk you get the cooldown?

tardy mauve
#

What component are you using to give the cooldown?

#

"minecraft:use_duration" should be the proper one

umbral valley
#

@tardy mauve , I think @unkempt grove is looking for a cooldown after the player finishes the drink. So if I finish drinking honey, I won't be able to drink another honey for 2 minutes. But the problem is that if I start drinking honey and then stop without finishing, I can't start drinking honey again for two minutes. Is that correct, @unkempt grove ?

tardy mauve
#

Show your code please

#

Are you sure you are actually using the item? Because minecraft:cooldown works just like on ender pearls

unkempt grove
#

I have the ender pearl thing selected i just didn’t know if there was another way because this one is kinda bad

dire lily
#

In theory, if you put the minecraft:cooldown in the item's code it'll receive a cooldown (like the pearl one) when it's consumed

#

Something like this:

{
  "minecraft:cooldown": {
    "category": "name", //If some other item has this category it'll recive the cooldown too
    "duration": 4, //Duration of the cooldown
  }
}```
#

You can check the documentation or the wiki for more info (cuz i don't remember the full syntax of the component)

tardy mauve
dire lily
#

Hum, there's no other method

#

The unique one it's set the duration of drinking/eating on 30 or similar

slim crown
#

Could try making it detect when you consume the item then starts a scoreboard timer where it tests if it’s active then if you try eating another one it does nothing and gives you the item back

unkempt grove
potent patio
#

I can confirm the built-in cooldown triggers on start of use… which sucks.