Random Potion Effect on Right Click with an item, then giving it a 30 cooldown

Started by lamon_damon on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Random Potion Effect on Right Click with an item, then giving it a 30 cooldown

I wanted to make a sword that, when right-clicked with, it gives a random positive potion effect that lasts 20 seconds, and after you get the potion, a 30 cooldown so you can't spam getting potion effects.

 

I've tried for hours to make it work and I don't know what I'm doing wrong, could someone help?

 

Here's the procedure I made: https://imgur.com/a/CGqLCD2

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there is a "when item right…
Sat, 07/05/2025 - 16:42

there is a "when item right clicked" trigger you should use instead then you just need to get a random number > activate an effect based on that number > cooldown the provided item stack